caseyi Posted October 20, 2000 Posted October 20, 2000 I have the following script to create records like Company A1 thr A5, B1 thru B5..etc. It's creating the records, but not the sequence number 1 to 5 (As and Bs show up). What did I do wrong? Set field [gCounter, gCounter=1] Loop Duplicate record/request set field [gCounter, gCounter+1] set field [combination_field, numToText[company] & number-field] Exit loop if [gCounter=5] End loop
Kurt Knippel Posted October 20, 2000 Posted October 20, 2000 quote: Originally posted by caseyi: I have the following script to create records like Company A1 thr A5, B1 thru B5..etc. It's creating the records, but not the sequence number 1 to 5 (As and Bs show up). What did I do wrong? Set field [gCounter, gCounter=1] Loop Duplicate record/request set field [gCounter, gCounter+1] set field [combination_field, numToText[company] & number-field] Exit loop if [gCounter=5] End loop Assuming that "company" is a text field, "number-field" is a number field and that "combination-field" is also a text field. Then your set field should look like this:set field [combination_field, company & numtotext [number-field]]. Everything else looks OK. ------------------ =-=-=-=-=-=-=-=-=-=-=-=-= Kurt Knippel Consultant Database Resources mailto:[email protected] http://www.database-resources.com =-=-=-=-=-=-=-=-=-=-=-=-=
caseyi Posted October 21, 2000 Author Posted October 21, 2000 please help...i made that change but the "number" field still shows up blank, i just need it to generate 1 to 5 on subsequent records, ie, A1, A2,to A5, B1, B2..to B5...etc. Am I missing some steps on the number field?
danjacoby Posted October 21, 2000 Posted October 21, 2000 You don't have a script step to set the number field (I assume you want number_field to equal the current gCounter). Hence: Set field [gCounter, gCounter=1] Loop Duplicate record/request Set field [gCounter, gCounter+1] Set field [number_field, gCounter] Set field [combination_field, company & numToText[number-field]] Exit loop if [gCounter=5] End loop Amazing how picky scripting can be. HTH, Dan
Recommended Posts
This topic is 9050 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