just a thought, haven't tested it - what about first assign user's display name to a text variable (that should allow you to select output format to be display name) and then supply that variable to UDA as input parameter?
Hi Marian Hatala,
Thanks for the response! I am not sure how to do that inside of a UDA. Since the PG data type is not accessible inside a UDA, the display name property is not either as far as I can tell.
Thoughts?
Patrick
I'm sorry, I uderstood you just need pass a user display name into to the UDA (aka filling input parameter).
if you need to do transformation with UDA, then I affraid you will have to use webservice call or LDAP query.
you might get idea here Retrieve a user's Display name from their login
Yes, I could do that but that is the UDA I am trying to build so that I do not have to do that for each task outcome branch I create. The actions I configure again and again are the query list (to get the modified by Person or Group and the outcome in the task list), then the set variable to get the display name from the Person or Group value.
then you may not to include your final set variable into UDA.
sound to me still better option do the display name lookup everytime in main workflow then build complex logic in UDA.
That would really defeat the purpose though as the point of this UDA was to avoid that. Unless someone has a workaround idea, this may not be a UDA that I can create.
Hello Patrick Kelligan -
If you are looking to query your Workflow Tasks list and pull back the last user that modified an item within the list, and get their display name, you can do this all in a UDA in 3 steps:
Step 1 - Query the list
Seems striaght forward enough, pick the list you want to query and filter/sort it how you want. If you want the last user, I would recommend that you sort by yModified] in descending order to ensure you get the latest one. Next grab the eModified By] user and store it in a variable.
Step 2 - Call web service
This gets a bit tricky, but is easy enough. You are going to want to call the GetUserInfo method in the Usergroup.asmx. You will have to provide credentials and then select the method from the drop down. Next feed in your variable into the web service input for userLoginName (string) and then select your output variable. Keep in mind, your output will be in XML!
Step 3 - Query XML
Lastly, you'll need to query your XML to get the specific element you want. I would recommend that you take a look at the raw XML to ensure that you are getting the correct data (this can be done by using the Run Now options in the web service to get the XML and the query XML to see the final product). Once you have the specific element picked out, add in your XPath (probably something like //@Name). Save your result in your output parameter for your UDA and your done!
This UDA can be dropped into any workflow and will provide an output of the last user to modify an item in the Workflow Tasks list as a display name, like so:
Hope this helps!
Hello Patrick Kelligan -
Were you able to get this working or find a solution?
Let us know!
Hi Jesse,
I have been on travel and just got back into the office. I have not looked into your idea yet. I will try and work it out by the end of this week and let you know.
Thanks so much for your response!
Patrick
Hi Jesse McHargue,
There were a few persnickety little details to work out but essentially you solution worked for us. Thanks for the valuable input!
Best Regards,
Patrick
Excellent! Glad to hear it!
Happy Nintexing!