2013-09-18 05:41 AM
3 REPLIES 3
2013-09-19 05:54 AM
Not sure I totally understood your question.
If you are asking about access to username who triggered the workflow execution during execution, you can get it using the Cmdlet Get-WfaRestParameter in your command code.
The certified command "Send email" has the sample code that uses this Cmdlet. A screenshot depicting the same:
Re: How to pass pass username
2013-09-19 07:00 AM
Shailaja's answer is correct for using it in commands.
Should you need it in user inputs - I am copying from another thread I responded to something similiar:
In 2.0, if you'd go and define a user input called "$_WFAUser" you'd be able to get that value (Of the user currently logged in to WFA).
It would be a read only input (ie shown on the screen in preview) with a pre-defined tooltip.
You can use it in queries to correlate the logged in user with information from additional tables (Either native ones from the DFM cache
or with proprietary info from the user-specific playground DB).
While admittedly it can use a little more polish - I believe this is very usable and will offer a viable solution to most use cases.
Hope you might find that useful.