I have a stored process presented to it's users via the portal (IDP). One of the prompts is for a SAS/Connect userid (which is generally the same as the users portal login and therefore available via the _USERNAME reserved macro variable in the STP server on execution.)
Is there any way to assign an initial value to a text prompt in a stored process using the _USERNAME macro var? (or any macro var?) I've tried using a %let to assign the prompt macro var the value of _USERNAME as well as &_USERNAME in the default value of the prompt properties to no avail.
I could create a dataset in metadata with one var/one row and use that to populate a default value at the beginning of the stored process but that seems over-complicated to me.
I tried to do this using a dynamic prompt, but was unable to get it to work.
Another possible solution is to build a prompt page yourself, but note that this will only work if the stored process is executed using the SAS Information Delivery Portal or the SAS Stored Process Web Application.
The technique involves executing a stored process that writes the HTML-based prompt to _WEBOUT. Below is a snippet of code to get you started.
Thanks for your help, Vince. I was kind of hoping that you'd tell me that there was some kind of trick to force it to be recognised .... Never mind. Perhaps this could get added to the developers' New Year 'To Do List' ?!
Thanks for the snippet of code to get started down the other path, though.
All the best for the holiday season and a good New Year when it comes,