Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Update and assign variable in Macro

Hi

I woud like to increment a variable 'vIncr' in Macro definition and assign the resulting value to another variable 'vLatest'. Please help me in achieving this. Thanks in advance...

Labels (1)
4 Replies
marcus_sommer
MVP
MVP

Try this:

var = ActiveDocument.Variables("var1").GetContent.String

ActiveDocument.Variables("var2").SetContent var, true

- Marcus

Not applicable
Author

Hi Marcus

I want to first increment the value of variable before assigning it to another variable. Main question is : how to increment the value of variable by 1.

marcus_sommer
MVP
MVP

var = ActiveDocument.Variables("var1").GetContent.String

var = var + 1

ActiveDocument.Variables("var2").SetContent var, true

- Marcus

Not applicable
Author

Great.. Thanks Marcus