Fields required in the database
First in our database we need to create three fields
1)AR which is a text field.(In this field adding or removing value from the list will be entered).
2)List field(text field) which will be an edit box.(including a vertical scrollbar)
3)Result field(calculation field) where your list will be displayed.
4)Field(textfield) to be used in the build list script.
Creating the custom function
–You can create a custom function.
[newlist=Substitute (¶ & thelist & ¶ ;¶ & value & ¶ ;¶)];
If (PatternCount (¶ & thelist & ¶ ;¶ & value & ¶ ) = 1;
Middle (newlist;2 ;Length (newlist)-2);
thelist & If(not IsEmpty ( thelist );¶) & value)
Note: Provide this function as a calculation in the result field by passing abc::list and abc::ar as parameters.
Creating a list
–Now you can either create list by typing manually in the list field or create a button and attach the following script.
Show custom dialog[“Option”;”How many values would you like in the list?”;abc::Field]
If[Get ( LastMessageChoice ) = 2]
Set Variable[$limit;Value:GetAsNumber ( abc::Field )]
Set Variable[$words;Value:”A quick fox jumped over the lazy dog”]
Set Variable[$counter;Value:$counter + 1]
Exit Loop If[$counter > $limit]
Set Variable[$list;Value:MiddleWords ( $words ; Right ( Random ; 1 ) ; 1 ) & “¶” & $list]
Note: you can provide your own sentence in the $words variable for generating a list.