How to get OData row ID

Dev 9 81 Reputation points
2023-03-23T10:21:18.6933333+00:00

I am trying to get a Dataverse Row ID in a For each action:

The documentation
https://learn.microsoft.com/en-us/power-automate/dataverse/delete-row

does not specify HOW to get Row ID dynamically

User's image

User's image

By running, I can see that the OData Id value is HTTP_STUFF.dynamics.com/api/data/v9.1/ag_TABLE_NAME(ff042241-57c9-ed11-b597-000d3aaa0711)

So the actual Row ID string: ff042241-57c9-ed11-b597-000d3aaa0711 , is inside the paranthesis at the end of the URL. How do I get that string value?

By just using the ODataId value directly in a Get Row action, I get "message": "The response is not in a JSON format.",

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
38,830 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Dev 9 81 Reputation points
    2023-03-23T10:52:26.41+00:00

    I got the string by using first(split(last(split(items('For_each_2')?['@odata.id'], '(')), ')')), but is this really the way to go?

    2 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.