Newbies KevRus1 Posted March 16, 2016 Newbies Posted March 16, 2016 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.
comment Posted March 16, 2016 Posted March 16, 2016 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.
Recommended Posts
This topic is 3521 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 accountSign in
Already have an account? Sign in here.
Sign In Now