How to not autoincrement variables?  Topic is solved

Here you can find technical support for the latest version 7.
Forum rules
Please read the forum disclaimer before posting!

How to not autoincrement variables?

Postby elzondk » 26 Jul 10, 17:39

Hello

I’m using PhraseExpress network edition.

Here’s what I need to achieve.

I’ve created a variable called NumDev, that autoincrement each time we call it.

In a phrase when I need it I just put {#insert NumDev}
But sometimes I need to use 2 times the variable in the same phrase, but don’t want to increment it in that case.
For instance :

“Hello Mr Jones, we’ve created quote number 1234, that quote will be send by Email and the file will be called 1234.pdf”

But here’s what I get today

“Hello Mr Jones, we’ve created quote number 1234, that quote will be send by Email and the file will be called 1235.pdf”

Notice that since I’m calling 2 times NumDev, it gets incremented 2 times.

Thanks !

David
elzondk
 
Posts: 2
Joined: 26 Jul 10, 17:36

Re: How to not autoincrement variables?  Topic is solved

Postby admin » 26 Jul 10, 21:40

Add the parameter "-inherit" (without "") to the #insert macro function.
Kind regards,
Technical Support
User avatar
admin
Site Admin
 
Posts: 5045
Joined: 10 Feb 06, 17:31

Re: How to not autoincrement variables?

Postby elzondk » 27 Jul 10, 12:41

Hi

So I've tried {#insert NumDev -inherit} but the variable NumDev still get incremented
Also tried {#insert -inherit NumDev} which results in nothing.

David
elzondk
 
Posts: 2
Joined: 26 Jul 10, 17:36

Re: How to not autoincrement variables?

Postby admin » 27 Jul 10, 14:27

Oops, it may be that -inherit does not apply for variables. My apologies. In this case, we would need to add this as a feature request for a future version. Our apologies for the inconvenience.

As a work around, you could create a temporary phrase with the variable value with #setphrase and use the temporary phrase for the insertion.
Kind regards,
Technical Support
User avatar
admin
Site Admin
 
Posts: 5045
Joined: 10 Feb 06, 17:31


Return to v7 - Technical Support

Who is online

Users browsing this forum: No registered users

cron