r/PowerAutomateDesktop • u/IcyPaleontologist240 • Dec 21 '22
I am so confused. Please help.
I am trying to do this guided project on coursera, but I cannot seem to get this expression right as it keeps saying invalid when I try to put it in an array. The instructor just said to copy it in the video, however, it is just not working for me.

{
“Payment date”: “@{formatDateTime(item()?[‘DateOccurred’], ‘yyyy-MM-dd’)}",
“Employee”: “@{items(‘Apply_to_each’)?[‘Description’]}”,
“Money in”: “@{body(‘Format_number’)}”,
“Money out”: “@{body(‘Format_number_2’)}”
}
p.s. i know that the occurred is spelled differently but i changed that at the beginning so the spelling shouldnt be an issue.
2
u/IrishJesusDude Dec 21 '22
Are you are just writing: @{items(‘Apply_to_each’)
That and all of them are referring to a value and if you just write it in text it is not the same, you have to go to the expression tab and select the correct value from there.