Excuse my code if it's messy, I'm still learning all the Khoros stuff! ๐
Here's the basic query I'm using, I've stripped out a few things that didn't really pertain to my issue. The real issue is that the query isn't returning the status object, whether I run it here in my code or if I run it in the API browser in Studio
<#assign currentDate=.now?iso_local>
<#assign occasionQry="SELECT subject, view_href, occasion_data, images FROM messages WHERE board.id='instructurelive' AND occasion_data.status IN ('upcoming','ongoing') ORDER BY occasion_data.start_time asc LIMIT 1" />
<#assign getOccasionData=commonUtils.executeLiQLQuery(occasionQry) />
<#list getOccasionData as occasionData>
//Assign some variables from my query here
</#list>
All the docs I'm seeing say that if I grab "occasion_data" I should be able to use the status object (but I'm still learning so I could be interpreting that totally wrong).
What I was trying to do later on with the occasion_data.status object was something like:
<#if occasionData.status == 'upcoming'>
//do some stuff for upcoming events here
<#else>
//do stuff for ongoing events here
</#if>
But that's where I got the null value error as if my query wasn't pulling in the status object. Can we not use status in this way? It clearly is tied to the event since I can pull it in for my WHERE filter but it doesn't come in as an object that I can use elsewhere in FreeMarker