Getting value of a slot variable in the parent page

I think I just need some help with syntax and available functions that are available to $user.psoSlotTools.getSlotContents($sys.assemblyItem,‘ciCFSearchBlock’,$params).

I am able to access info from slot ciCFSearchBlock which is contained in another slot named ciCustomSideNavSlot. If I set $user.psoSlotTools.getSlotContents($sys.assemblyItem,‘ciCFSearchBlock’,$params).size() in my parent page bindings I get the expected printout of the var as 1 with no errors.

So I am getting info from that slot, but I need to get a particular value that was set in a content type form.

But when I try $user.psoSlotTools.getSlotContents($sys.assemblyItem,‘ciCFSearchBlock’,$params).getProperty(‘dbtype’).String I get an error that says:

Could not find method getProperty for object

Can anyone tell me what I can use to get the value dbtype from the ciCFSearchBlock slot? I’m obviously mixing and matching the wrong functions together.

If anyone could just give me a line or snippet of code they have used to do this you would make me the happiest developer ever! Thanks!

Look at the return type of $user.psoSlotTools.getSlotContents($sys.assemblyIt em,‘ciCFSearchBlock’,$params).

try something like:
#set($slotContent = $user.psoSlotTools.getSlotContents($sys.assemblyIt em,‘ciCFSearchBlock’,$params))
#foreach($item in $slotContent)
…do Stuff.
#end

Rushing is spot on. You have to iterate over the each item in the slot and do your processing from there. To take it a little farther and answer your particular question about how to get items from the content type form (i.e. data from the content item itself), as you iterate over each slot item in the way that Rushing pointed out, you would do the following:

$item.node.getProperty(“rx:[fieldName]”).String)

Of course you could set varaibles to this value and do whatever you need to do from there.