Weird! Accessing "item." from button event in a collection

Accessing the item from a button shows strange results. For an alert, it works but sometimes shows undefined. As you can see in the following screenshot under description, the item.plate is red but under "Only run when" item.type is green and defined.

Here you can see that the plate is defined and the alert works as expected, it just shows undefined.

When using a button to trigger a script however, it doesn't pass the variable and the script fails to run:

Capture Wheels2Go Mobile  Editor Retool

Hey @w2go!

Thanks for flagging this behavior, was able to see the exact same thing on my end and have brought it to them dev team for further investigation :slightly_smiling_face:

Here is some more related strange behavior:

In show row of key value pair, item is not defined but I was able to access the value using self as follows:

Ah! Good to know, thanks for reporting, it will be investigated as well!

Any update on this? I now have to resort to hacky solutions because of this bug...

Hey @w2go!

We recently pushed a fix that should allow for item to be used in script event handlers! Can you let me know if you're still seeing other behavior?

The second issue you mentioned (item being available in the "Show row" field) is still being investigated. Does the workaround you have there work for now?

It still doesn't work in run script event handler. See the gif below:
Capture Wheels2Go Mobile  Editor Retool
It doesn't works as additional scope for a query either.