Thanks for looking into my issue
I followed Reza Dorrani Video for "Power Automate SharePoint Item Modified flow | Track Column Changes"
I have referred Ur articles for creating a flow from SharePoint to mail.
First Send an Http Request
Second one is empty
Iam getting following error in my flow
_api/web/lists/GetByTitle('Risk_Database')/fields?$select=Title,InternalName&$filter=InternalName eq '@{item()}'
body('Send_an_HTTP_request_to_SharePoint_-_Title')['value'][0]['Title']
coalesce(body('Send_an_HTTP_request_to_SharePoint')?['d']?['results']?[0]?[item()], '')
Thanks for the knowlede , I had this issue before , I have rectified it using one of ur articles!
But now, I have crossed checked the column values it's not null.
The above image is the version history after I made changes to the one of my SP LISTS Version 6
If u could check the version of the flow in SEND AN HTTP
"parameters/uri": "_api/web/lists/GetByTitle('Risk_Database')/items(16)/versions?$filter=VersionLabel eq '5.0'&$select=Risk_status,AssetsImpacted,Financial_impact,Stage_of_risk,Risk_rating0,Risk_rating,Risk_treatment_type,Modified"}
body('Send_an_HTTP_request_to_SharePoint_-_Title')['value'][0]['Title']
coalesce(body('Send_an_HTTP_request_to_SharePoint')?['d']?['results']?[1]?[item()], '')
coalesce(body('Send_an_HTTP_request_to_SharePoint')?['d']?['results']?[0]?[item()], '')
Hi @Danny_Dicaprio,
Edit: I now notice you are using the same expression only with an index of [1] for the Value property. It is looking for the second item in the results of the version history 😅
But this HTTP request will only return one item. Where did you find this expression, or why are you using an index of [1]?
Just to double check. Fields can be empty in your list item before you changed it/updated the list item. So, technically it is possible that a field was empty before you updated it and the Value property would be null/empty.
Can you double check this isn't the case with your test?
Below is an example where it was the case in my test run. It would be useful to see your Body and also to see which version of the item you are retrieving, is it version 1.0?
Only the second one has the headers
Still the current value is showing as blank
can u please help me with it
Hi @Danny_Dicaprio,
Make sure only the second Send an HTTP request to SharePoint action uses the nometadata headers, the first one doesn't need those headers.
And can you also share a screenshot of the outputs of the first HTTP action of your last flow run?
Thanks for the response, It worked!🙌
But each time some new issue is happening, I have a person type column, lookup column, choice column.
Values from these columns are shown blank,
Can u please help to understand why these columns are blank?
Also, I tried to update the flow by adding current values. But the current value is not showing up.
body('Send_an_HTTP_request_to_SharePoint_-_Title')['value'][0]['Title']
coalesce(body('Send_an_HTTP_request_to_SharePoint')?['d']?['results']?[1]?[item()], '')
coalesce(body('Send_an_HTTP_request_to_SharePoint')?['d']?['results']?[0]?[item()], '')
Value is shown as blank
Column<b> @{items('Apply_to_each_VarValues')?['Column']}</b>has updated from<b style='colorred'>@{items('Apply_to_each_VarValues')?['value']} </b>to<b style='Color:green'> @{items('Apply_to_each_VarValues')?['CurrentValue']}</b>
Could u please help me with this issue , what would be the reason for the "Value" not showing up
I see the action is returning results, so that part is fixed. The reason the expression is not working is because the nometadata headers are missing in the Send an HTTP Request to SharePoint action, like in the screenshot my example:
When you don't not use those headers, the d property will be returned, which is not part of the expression you are using in the append to variable action.
Can you add the headers to fix this?
Accept application/json;odata=nometadata
Content-Type application/json;odata=nometadata
Sorry for the delayed response
I have made the changes, but the flow is not running properly.
It is continuously showing a similar error
InvalidTemplate. Unable to process template language expressions in action 'Append_to_array_variable' inputs at line '0' and column '0': 'The template language expression 'body('Send_an_HTTP_request_to_SharePoint_Title')['value'][0]['Title']' cannot be evaluated because property 'value' doesn't exist, available properties are 'd'. Please see https://aka.ms/logicexpressions for usage details.'.
body('Send_an_HTTP_request_to_SharePoint_Title')['value'][0]['Title']
coalesce(body('Send_an_HTTP_request_to_SharePoint')?['d']?['results']?[0]?[item()],'')
Hi @Danny_Dicaprio,
Looks like you have made a small typo in the ColumnName value of the Map field of your first Select action.
That's why the value shows up with leading space, for example ' Risk_status' instead of 'Risk_status'
Can you remove the space character in front of the replace expression?
Hi @Danny_Dicaprio,
It looks like it cannot find the field. The loop is normally using the outputs of the Set Column Names action. Can you share the outputs of your Set Column Names action? This will help the troubleshooting for us.