October 20, 200025 yr 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
October 20, 200025 yr 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 =-=-=-=-=-=-=-=-=-=-=-=-=
October 21, 200025 yr Author 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?
October 21, 200025 yr 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
Create an account or sign in to comment