March 16, 20169 yr Newbies Not sure if this is the right area to post this. I need to be able to create a number of records based on 2 numbers I enter. This will be something like : 0123-0001 to 0123-0035. I would like a new record for each number i.e., 0001, 0002, 0003 etc. How would I do this, or are there any examples anywhere? Thanks in advance for your help.
March 16, 20169 yr Not sure what exactly your difficulty is. Assuming you have entered the start and end values into global fields, you could have your script do: Loop Set Variable [ $value; Value:SerialIncrement ( YourTable::gStartValue ; $i ) ] New Record/Request Set Field [ YourTable::Value; $value ] Exit Loop If [ $value = YourTable::gEndValue ] Set Variable [ $i; Value:$i + 1 ] End Loop Commit Records/Requests Note that this does not test that the end value is a serial increment of the start value; if it is not, the loop will continue forever. Nor does it test if the values already exist as records.
Create an account or sign in to comment