I would like to create a field into which, I wish to set a value obtained by cycling through a pre-defined list of data.
The intention is the operator would "click / press" on the field (now defined as a button), which will run a script. This script should get the name of the field (to be used by the "Set Field" script step later), and then get the current contents of the field.
Depending on the current contents of the field, the "next" value from a data set would be set into the field.
I have achieved this by setting a button parrameter of :: GetFieldName ( "path::fieldname" ) . This is then set to a variable where all is set as required, and the script runs as expected.
The issue is that there will be quite a lot of fields that will be needing this treatment. At the moment I have to go into each field and re-define the "path::fieldname" component to match the field name after it has been set.
I would like to get this path and fieldname automatically each time the button is "clicked / pressed, thus requiring only that I re-define the field having duplicted one that is pre-configured.
Any help would be appreciated.
Instead of using a button, you could use the OnObjectEnter trigger for whichever field.
So it will be not important to know the field name, because it will be always the active field.
The triggered script will be something like:
Set Field [ "no field name here" ; next value ]