Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to access the information inside a variable by constructing the variable string name in an expression. All of my variables were created using the format "v" + [Client Name]. For instance, the company "Acme" would have a variable vAcme.
I would like to dynamically access the variables in a straight table that uses the Client Name as an expression. I have been unable to access the variable information using my current methods. My expression looks something like this:
='$(v' & [Client Name] & ')'
This returns NULL. Is there a reason this does not work? Can I update my syntax to make it return the variable value?
You can do that but its more complicated. You need to load the variable names in the load script for each client and then use the PICK() function
Take a look at the attached example (QVW).
Highlights below in the screenshots
This may work:
=$(='v' & [Client Name])
But if its in a text box and there are multiple client names you'll need to select only one client name and perhaps use only() function
=$(='v' & only( [Client Name]))
the '=' inside the dollar sign expansion will build a string with the right variable name. the $() will evaluate it as a variable.
This is great, but is it possible to use a similar formula in a straight table? My dimension is [Client Name], so I would assume the expression would be able to parse through and choose the current row item/client name, but this expression only works, as you mentioned, when a specific client is selected.
You can do that but its more complicated. You need to load the variable names in the load script for each client and then use the PICK() function
Take a look at the attached example (QVW).
Highlights below in the screenshots
Thanks! This works great.