Every Loop requires an End Loop. (Just as an If requires an End If.) It's extremely important that when you construct a Loop, you provide some kind of exit, else you'll get stuck in an endless cycle.
Yes, using Go to Record (Next or Previous) with "Exit after last" is one way to exit a loop. Another is the Exit Loop If step, where you provide a calculation or condition that triggers the exit.
Regarding your imports, I'm not sure if you have a question there or not.
As for value lists, a script doesn't literally pop up the list and choose something. You just tell it what value you want, e.g.:
If[ textField = "monkey" ]
Set Field[ valueListField ; "banana" ]
The value will be set regardless of whether it's actually a member of the field's value list. If the value list is based on field data, then the value list itself will now contain the new value.
There is no way to create or edit custom values via script. (There are workarounds, such as storing your value lists in fields in a single-record table.)
So playing around and I was able to get radio buttons to work, as well as value lists.
Using the Set Field I was able to select the value if the value already existed. That I can deal with.
But it seems there is an acceptation.
If the value list is based off a field, it won't select it.
The field will contain the new value, but not select it like it does on custom value list/and radio, even if the value already exists.
Am I doing something wrong? Or is it not capable of it?
To me it's important that it selects the pre-existing value, like it does in custom valueslist due to search queries that's done often.
"There is no way to create or edit custom values via script. (There are workarounds, such as storing your value lists in fields in a single-record table.)"
Can you explain what you mean by that?
Is that like taking the data, create a new record in a different table, and create a value list of that field, then go back and have your script set that value to match the one you just put in the other table field?