Is there any way to use list values in scripts?
Looking forward to the right answer,
In order to provide a more detailed answer please provide a more detailed question.
Specifically if you have tried something and it does not work, explain what you have put together and what your expectations were.
There are two Design functions that address value lists:
Let's be clear that you mean this as a value list:
In addition, there are several functions that work with "lists" (return separated values). Such as:
RightValues(), LeftValues(), MiddleValues()
Along with many custom functions that work with value-lists...
The functions can be called within various script steps, if that helps.
I have some values in "Value List" and I want to access that values in the script, what should I applied to get these values in a script.
What do you want to do with them?
Did you look at the Design Functions? These read the value lists you already setup. If your values are from a field, then there may be other ways to get to them without the Design functions.
Please explain more on what you want to do with the values once you get them from the defined value list.
Fawad Ali wrote: I have some values in "Value List" and I want to access that values in the script, what should I applied to get these values in a script.
Fawad Ali wrote:
Value lists are UI widgets to guide the user in making choices from a list. When you design a script the assumption is that you already know what the script needs to set so picking from a a value list seems odd.
While you can get all the values from a value list through the design functions as beverly explained, picking from one in a script would be positional (as in "pick item # 4") and that is what would be odd in a script...
So can you explain in a little more detail what the goal is?
I want to create 30 records by clicking a single button, in these 30 records there will be different 30 values which are already created in a "Para Name"(Value list).
Now what I want is that to access those values from the Value List in a script and from a script I need to approach some procedure to insert those values in an each separate record.
Assuming you are talking about the Value Lists in the "File > Manage > Value Lists", you can use the script step ValueListItems to set a field or variable with the entire Value List. As noted before, what do you want to do with them? Often when I have a list of any kind (value, array, etc.), I am looping through it to do something such as:
set variable ( $Array = ValueListItems ( [ file name ] ; [ List name ] ) ;
set variable ( $n = ValueCount ( $Array ) ) ;
set variable ( $i = 0 ) ;
set variable ( $i = $i + 1 )
Exit Loop If ( $i > $n )
set variable ( $Item = GetValue ( $Array ; $i ) ) ;
thEN DO SOMETHING LIKE FIND OR UPDATE A RECORD
Do you mean something like this?
set variable ( $Array = ValueListItems ( Get ( FileName ) ; "Para Name" ) ;
Go to Layout ( "some layout" )
Enter Browse Mode
New Record Request
Set Field ( "some field" ; $Item )
Really useful, thanks Taylor.
Have a good day.
Thanks for your kind suggestion.
You might make Taylor's day a little nicer if you used your exclusive power as the poster of the original question to mark his answer as the correct one.
Retrieving data ...