Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I currently use the following command in my macro to filter on a specific value before exporting data into a QVD. I have to repeat this operation across multiple fields using the same value. I would like to use an Input Object to set the search value as a variable, and then insert that variable value into the ActiveDocument.fields command. Can someone show me how I would do that?
Here's my current command: ActiveDocument.fields("CREG_GLOBAL_ULTIMATE_ID").Select("23471")
The variable name associated to the Input Object is, "vZONE_CR_GU_VARIABLE"
I thought I could do the following command, but it isn't working. I think I must be missing a step: ActiveDocument.fields("CREG_GLOBAL_ULTIMATE_ID").Select("vZONE_CR_GU_VARIABLE")
Thank you!
Here are two ways to get the contents of a variable using VBScript.
varValue = ActiveDocument.GetVariable("vZONE_CR_GU_VARIABLE").GetContent.String
varValue = ActiveDocument.Evaluate("'$(vZONE_CR_GU_VARIABLE)'")
And then you can use like:
ActiveDocument.fields("CREG_GLOBAL_ULTIMATE_ID").Select(varValue)
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
You are the MAN! Thank you so much, Rob. It worked exactly as you described. This will save me a ton of time... you're my hero.
Here are two ways to get the contents of a variable using VBScript.
varValue = ActiveDocument.GetVariable("vZONE_CR_GU_VARIABLE").GetContent.String
varValue = ActiveDocument.Evaluate("'$(vZONE_CR_GU_VARIABLE)'")
And then you can use like:
ActiveDocument.fields("CREG_GLOBAL_ULTIMATE_ID").Select(varValue)
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
You are the MAN! Thank you so much, Rob. It worked exactly as you described. This will save me a ton of time... you're my hero.