Create HTML table choice item displaying code in the table output
-
08-02-2021 - |
Frage
My HTML table which I created in a workflow in Flow.microsoft.com is working perfectly fine but when I enter the choice items it outputs a code in the file. for example for: - coloumn: Change Outcome
choices: Success Open Cancelled Rescheduled Issue Chosen value: Open
The output instead of a single chosen value it gives like this: {"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":1,"Value":"Open"}
But for the normal column fields the output is normal. Does anyone know how to fix it?
Lösung
Recapping our discussion: If you are using the Advanced -> Column Options -> Custom, your can set the expression for that item to point to the Value
in the JSON sub-object rather than directly at the column object. For a choice column named Change Outcome
, that expression would look like:
item()['Change Outcome']['Value']
User fields are a similar case of having a subject with multiple values, but the properties are different. A User field from SharePoint will look like this in your results:
"User1": {
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
"Claims": "i:0#.f|membership|thisuser@thistenant.com",
"DisplayName": "Somebody Whologgedin",
"Email": "thisuser@thistenant.com",
"Picture": "https://mytenant.sharepoint.com/sites/mytestsite/_layouts/15/UserPhoto.aspx?Size=L&AccountName=thisuser@thistenant.com",
"Department": "Human Resources",
"JobTitle": "Learning and Development Specialist"
}
So, if you wanted to just show the user's email in your table, you would reference:
item()['MyUserField']['Email']