using #initslot with prop_slot

I’m trying to set a variable based on whether or not a prop_slot populates or not. The #initslot command seemed the most logical solution, because I can test whether the slot loaded, but it doesn’t seem to work with prop slots. Any suggestions? Would there be a better way to use a conditional statement on a prop slot than using #initslot?

Here’s what I have which currently does not work (it doesn’t show an error, though, it just doesn’t return a value, even though the prop slot should exist):

#prop_slot_simple(“slotName”)

#initslot(“slotName”)
#if($sys.currentslot.relresults.size() > 0)
#set ($slot_content = “true”)
#end
#endslot(“slotName”)

Try this:

#set( $my_slot_content = “#prop_slot_simple(‘slotName’)” )
#if( $my_slot_content.length() > 0 )
#set( $slot_content = “true” )
#end

This worked perfectly. Thank you!