I am running an expanded REST query ​against a list in a Designer 2013 workflow. I am trying to get the email address associated with the user display name listed in a people picker field. The query runs successfully and I pass the results to a dictionary variable called item.

When I call for the contents of item I get the following, for example (I've redacted addresses)

{"__metadata":{"id":"Web/Lists(guid'e73423e0-d325-42e0-a4c3-4c73e130681a')/Items(1)","uri":"http://sharepoint site URL /sites/MobileThinClients/_api/Web/Lists(guid'e73423e0-d325-42e0-a4c3-4c73e130681a')/Items(1)","etag":"\"606\"","type":"SP.Data.DevicesListItem"},"NBK":{"__metadata":{"id":"c486bdb8-ed31-4ed3-91f8-23b6affedcc0","type":"SP.Data.UserInfoItem"},"EMail":"user's email address"},"Id":1,"Hidden_checkout_time":null,"Hidden_device_x0020_name":"MTC0010","Hidden_due_x0020_date":"2018-03-01T19:14:00Z","Tardy_count":1,"ID":1}

I am looping through the table and running the query against each item (Id) in the table. each works successfully except when I run a get command to pull the EMail value out. I try to store it in a variable (List_username), as I have with the other data points.

the problem is that the List_username variable is always empty. When i do the same thing for other fields in the query result it stores the content in the variable and I am able to use it, but for the email address it isn't working. code is below. Any ideas?

2013 Workflow code

  • We resolved this by running a separate get d/results command against the returned data. However, we specified the associated column name and item number: get d/results(0)/field name. Though in this case, we passed the item number via a variable because we are looping through the list. get d/results([%variable:name%])/field name – Kelly Apr 2 '18 at 13:13

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.