Statement: Action, Type: Initial
Move List Down
Format: Move List Down integer dest-support-action
where
-
integer = any numeric variable
-
dest-support-action = any one of the valid destination supporting action identifiers listed below:
Description
The Move List Down identifier will shift all items located in the dest-support-action identifier to the right by the value of integer. The last item in the list will be removed. The action statement is used when you want to keep a rolling count of layout items or data items in a data record.
Example
We are keeping track of the last 5 roulette numbers in a data record spin list. We only want to keep track of the last 5 numbers that have appeared. When the data record spin list has more than 5 items in the layout list, we will use the Move List Down and shift the items to the right by 1 and set the Layout index to the maximum number of items. The next time a number appears, it will be inserted to the first position of the data record spin list. The following example will perform this task.
RX Script | ![]() |
---|---|
If Record "spin list" layout count > 4 then begin Move List Down by 1 of the items located in Record "spin list" layout Put 0 on Record "spin list" layout index end Add 1 on Record "spin list" layout index Copy last Number to Record "spin list" layout |