I am creating an HTML table from the info of a sharepoint list. So far it was easy until I ran with the column Initiator, which I thought behaved like the column Author. The difference being that Initiator can have more than One Name on it(up until 3). So when selecting the dynamic value option that is displayed by power automate I get the following value in my table cell:
[{“@odata.type”:”#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser”,”Claims”:”i:0#.f|membership|[email protected]”,”DisplayName”:”xxx, xxx(xxxxx x)”,”Email”:”[email protected]”,”Picture”:”https://xxxx.sharepoint.com/teams/TCNX-knowhow-KeyUser/_layouts/15/UserPhoto.aspx?Size=L&[email protected]”,”Department”:”xxxxx”,”JobTitle”:”Mechanical Design Engineer”}]
Out of all of this I only need the value in DisplayName. I have tried with no success to loop and parse the JSON OR set a variable and try to save this elements in the variable.
- First approach:[using Set variable][1] the problem here is that it only takes the first value retrieved(the first name) and puts the same name everytime even when the item is different. However during the loop the value extracted each time is correct the problem is just when I try to assign the correct value to the HTML table it doesn´t match the item it belongs to.
- Second approach:using Append String Variable . The problem is that it puts every Name found in the same item, all items have always all the Names of all the initiators.
- Third approach:[using parse JSON][2] here the problem is that I cannot acces the Initiator Display Value outside of the loop, and I don´t want to create a table per loop.
My Table goal is for it to look something like this where I have a column Called initator with each Iniator´s item properly listed in the cell and if more than one initiator separated by a comma:
[Table Goal][3]
I hope someone can help me I have been trying to solve this problem for a long time.
[1]: https://i.sstatic.net/8MJpogFT.png
[2]: https://i.sstatic.net/8wrryzTK.png
[3]: https://i.sstatic.net/Um0QA53E.png