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

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

Recommended Posts

  • Newbies
Posted

Hi all,

 

I hope this is right place for this question.

 

I have to make a script which will make a record set of all variations where a have on first and third spot a character and on second a number. En result should look like this:

 

A0A

A0B

.

.

.

A0Z

A1A

.

.

Z9Z

 

I would appreciate any help.

Posted

Be patient.  This script takes over a minute on my machine

Set Variable [ $char1; Value:Code ( "A" ) ]
Set Variable [ $char2; Value:Code ( "0" ) ]
Set Variable [ $char3; Value:Code ( "A" ) ]
New Record/Request
Set Field [ sequence::TheField; Char($char1) & Char($char2) & Char($char3) ]
Loop
   Loop
      Loop
         Set Variable [ $char3; Value:$char3 + 1 ]
         Exit Loop If [ $char3 > Code("Z") ]
         New Record/Request
         Set Field [ sequence::TheField; Char($char1) & Char($char2) & Char($char3) ]
      End Loop
      Set Variable [ $char3; Value:Code ( "A" ) ]
      Set Variable [ $char2; Value:$char2 + 1 ]
      Exit Loop If [ $char2 > Code("9") ]
      New Record/Request
      Set Field [ sequence::TheField; Char($char1) & Char($char2) & Char($char3) ]
   End Loop
   Set Variable [ $char3; Value:Code ( "A" ) ]
   Set Variable [ $char2; Value:Code("0") ]
   Set Variable [ $char1; Value:$char1 + 1 ]
   Exit Loop If [ $char1 > Code("Z") ]
   New Record/Request
   Set Field [ sequence::TheField; Char($char1) & Char($char2) & Char($char3) ]
End Loop

This topic is 4183 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.