How can I make a computed column use the result of a parameter in an eguide Filter and Query.
Say I have a parameter called thing.
How do I structure the expression text so that it can use the parameter. I've tried &thing, "&thing" and various other combinations, but I can't get it to request the parameter to fill before actioning. Error along the lines of symbolic reference not resolved.
Peversely system parameters seem to resolve properly. So an Expression Text of "&_clientuserid" will resolve to the user id.
The parameter has to be given a value before you can use it.
You can use the parameter manager, (under the tools menu), and to create it. There are options as to how it gets a value, by prompting, etc. Then right click on the filter query task select properties / parameters and add the parameter to the query. It should then get resolved.
Search the EG help for creating parameters or even this forum
I create the parameter, name: thing, type: string, default value: aaa, prompt for value selected, allow macro substitution selected, (even tried enclose values within quotes).
Then created a filter and query, with expression text of &thing, and left it with the default name of Calculation1.
The moment I close down the construction of the calculated item, it causes the error. Log is:
WARNING: Apparent symbolic reference THING not resolved.
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,
a missing value, BTRIM, INPUT, LOWER, PUT, SUBSTRING, UPPER, USER.
However, if I use the system item &_clientuserid, I can get it to populate properly by putting "&_clientuserid" into the text of the computed column. If I use "&thing", it will run, but returns &thing rather than resolving for parameter input.
ACW: Did you register the parameter with the Filter and Query task? Right-click the task, select properties, and the third choice down in the selection pane should be called "prompt" (EG 4.2) or "parameter" (EG 4.1). You need to add the parameter to the task in order for things to work. Sneaky, isn't it? In EG 4.2, you can also add a prompt directly in the Query Builder interface under Options \ Options for this query.
This is also a handy tactic when you have prompts in a piece of SAS code.