Jump to content

Get next value from value list


This topic is 6464 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi All. I have a loop that needs to go through a value list and set a field to the next value (then exit loop after last value).

I think i have it working except the calculation to grab the next value. I assume it uses the GetValue function, but not sure exactly how to script it. Can anyone help? Thanks!

Link to comment
Share on other sites

I would put the Value List in a global text field with - Set Field[MyGlobal; ValueListItems(Get(FileName); "MyValueListName"]. Then create a global counter field (number).

then you can step through each value in the list with the MiddleValues function...

Set Field[MyCounter; 0]

Set Field[MyGlobal; ValueListItems(Get(FileName); "MyValueListName"]

Loop

SetField[MyField; MiddleValues(MyGlobal; MyCounter ; 1 )]

Set Field[MyCounter; MyCounter + 1]

Go To Next (Exit after last)

End Loop

Link to comment
Share on other sites

This topic is 6464 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.