Using Power Automate, I've got a flow that runs an API call to get a record of data. I'm using this data to update properties in a Sharepoint List, and all is working well so far.
Now I need to change the format of one string from yyyymmdd to mm/dd/yyyy - this is not where the problem is (yet).
To change the format, I've tried various approaches, I've split the current value up in 3 parts using first one Compose, and then 3 compose (one for year, one for month and one for day), then I tried a concentate on the output. This did not work - I'm getting an error message which i will get back to.
I've tried do add a compose directly after the Parse JSON
I've tried to add a compose in a "apply to all"
I've tried to move the parse json to "apply to all"
I've tried to add a initialize variable and add variable with a subsequent compose.
The compose expression is not the problem yet, cause when I try to save I always get the same message with various action names depending on the approach:
Flow save failed with code 'InvalidVariableOperation' and message 'The inputs of workflow run action 'Compose_1' of type 'Compose' are not valid. The variable 'Compose 2' must be initialized before it can be used inside action 'Compose_1'.'.
So I'm stuck, I can use the output from the parse json to update the field in my Sharepoint list, but I Want to have a different format.
I'm using formatDateTime in my compose to try to change the format.
Kind of stuck here, anyone have any good explanations for why this shouldnt work?