Hi
I built a flow to query service now for changes, if there are none on the day it end and if there are any, it create a html table from the output array and email it out. The flow work great except the assigned to field return the user id and not the name which is expected behavior. We can use the Get User step and query that user id to return the name from the user table instead. The part i am struggling with is how to do that for all the user id's in the array.
Thanks
Hi @Mira_Ghaly
Thank you for your answer. It took me a minute but i have managed to follow your steps and get it working in the end.
ps. Is there a way to change the array we created to dynamic content? I couldn't create html table with custom fields from that array, had to use automatic which broke my html formatting but i fixed it by updating the json.
Screenshot below in case someone else need it in the future: (for the html URL link to work correctly you need to use the output of create html table in a new compose variable and add the expression below for the link to show correctly in an email:
replace(replace(replace(body('Create_HTML_table'),'<','<'),'>','>'),'"','"')
Hi @rogueone
1. You will need to Initialize an array variable
2. Apply to each on the List Records
3. Inside the Apply to each call the Get User Action
4. Construct a compose json object and pass all the values
{
"ChangeDirection":Value from Apply to each,
"Assigned": Name from Get User
}
5. Call Append to array variable and add the compose data operation
6. Outside the apply to each loop pass the array to the create HTML action
Hope this makes sense!
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional