Can not ouput value 'item.index' from trigged action


#1

Yesterday I figured out a way to get certain value from certain row in repeater. I put a hotspot (other widget is the same) in repeater and set a interaction trigged by WIDGET outside the repeater. The interaction is set to output the value from certain row if the condition is OK and then write it in OUTPUT widget. It worked on almost every custom column value, but I found it does not work on the original one ‘item.index’. If I put that logic on like “onMouseClick” and I did click on it, it worked. It seems like ‘item.index’ can not be output from trigged Interaction.

Is it a bug?


#2

Could you post your .rp file? It is kind of hard to follow what you are doing–and trying to do–from the small GIF file…


#3

Hello!

For those following along at home, b2006771 wrote in to our help desk with a sample file demonstrating the issue. It looks like if a repeater widget has an OnClick event that sets text on another widget outside of the repeater to the clicked row’s [[Item.index]] value, that value will get displayed as “NaN” if the OnClick is triggered by an external widget’s Fire Event. I’ve gone ahead and filed this on our end for further investigation, but in the meantime instead of using Fire Event to trigger the OnClick on the repeater widget, you can use “Move” to move the widget by (0,0), and then use OnMove of the repeater widget to trigger the Set Text action. This should allow the [[Item.index]] to get printed as expected. Hopefully that helps!


#4

It works. Thanks Alyssa.


unlisted #5