Focal Point
Generate sequence number

This topic can be found at:

November 25, 2010, 07:51 AM
Generate sequence number
How can we generate sequence numbers and attach that to the data which need to be uploaded to a particular field in a database table.

For example there is a EmployeeAccessCode field in the Employee table, and This field needs to filled using the first two characters of the Employee name (using _substr function) and then 4 digits (generated sequence number).
i.e. _CONCAT(_substr(EmployeeName),SENERATED_SEQUENCE_NO)

I am using iWay ISM version 5.5, with SQL server 2008 as the database.. OS Win XP. I am looking out for some possible option with the iWay Designer objects.

November 26, 2010, 09:18 AM
iWay Newbie
Hi Amigos,

have you tried the unique function:

 _CONCAT(XPATH(//EmployeeName), _UNQ(###)) 

This should give you: Amigos001, Amigos002, ..., Amigos999

Just adjust the pattern to include the number of digits you need.

Note that if you have more than one EmployeeName field, you might end up with something like:


Hope this helps...


iSM 6 on AIX,
iSM 6 on Windows 2008 Server
WebFOCUS 8.0.03 on AIX
November 27, 2010, 02:46 PM
Thanks.. this solution worked.