I am trying to edit a response in Microsoft Forms before outputting it into an Excel sheet via Power Automate.
I am using the "Compose" action in Power Automate to update the contents of a form response.
I want it to check if the response does not contain a colon. If it does not contain a colon I would like to insert a colon two characters into the response. If it does contain a colon I want it to return the original phrase. This is what I came up with but I can't get it to work. It entirely bypasses the compose action every time.
if(not(contains(triggerBody()?[Question],':')),concat(triggerBody()?[Question],':'),replace(triggerBody()?[Question],':',':'))
The responses will be military time in the following formats. I want to correct the responses to all have the colon separator so that they are instantly compatible with the Excel sheet it will be output to.
1309
14:50
Any guidance would be appreciated 🙂