Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8797 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

=-=-=-=-=-=-=-=-=-=-=-=-=

Posted

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?

Posted

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

This topic is 8797 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.