Please enable JavaScript to view this site.

Navigation: Using the Cobwebb Designer > Useful Tips

Multiple Variable & Parameter substitution

Scroll Prev Top Next More

It is possible to populate Variable, Exit Program Parameter and Static Text elements with information stored in other Variables or Exit Program Parameters; and from version v6.2.50 of the Server Software - Trace elements. For instance if you wish to pass a Parameter, which contains several Variables INVNO, CUSNO & INVDATE, to a program e.g.

Data        Invoice No: ?INVNO for Customer No: ?CUSNO on date ?INVDATE

Result        Invoice No: 123456 for Customer No: ABC001 on date 10/09/11

This sort of string may be used as Data for a Variable or Exit Program Parameter or the Text for Static Text.

If you wish to create a string without spaces then you will need to add a extra ? after the variable. In the following example we don’t want a space between the value of the variable CUSNO and the quote so you need to add the ? at the end of the variable name e.g.

Data        WHERE FIELD='?CUSNO?'

Result        WHERE FIELD=’ABC001’

If you decided to store the quote in another variable called QUOTE, then your string would be as follows; again adding the extra ? after the variable name each time:

Data        WHERE FIELD=?QUOTE??CUSNO??QUOTE

Result        WHERE FIELD=’ABC001’

If you wish to actually include a Question Mark in your string this needs to be followed by at least one space otherwise it will assume a Variable or Parameter name. If you wish your Question Mark to immediately follow a previously stored Variable or Parameter substitution then you will need to specify two Question Marks e.g.

Data        When did you send Invoice No: ?INVNO??

Result        When did you send Invoice No: 1223456?

See Also

Populate 2D barcode with more than 132 characters