cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PhilStanley
Helper I
Helper I

Unable to update row in Dataverse

I cannot find this solution anywhere that works so I am hoping I can get help with this.

I have a form that enters data into Dataverse which works.

When another form comes through I want to check if the record already exists and update it. This I have spent days trying to get it to work. I created the update section on its own as shown in the image.

Going from left to rightGoing from left to right

 

1) I get the response details from the form - all ok

2) I can get the row from the table in the 'List rows' section.

3) I add the 'Update a row' section and automatically get the 'Apply to each' which I don't really need.

4) I put in the row id that I got from the 'List rows' section.

5) For the test I am hard coding the few fields rather than getting it from the form so as to rule out any issues there.

When I run the flow I get the error shown in the image.

I am very new to this and have tried everything possible first and hope someone can help me.

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisPiasecki
Super User
Super User

Hi @PhilStanley ,

 

The unique identifier of your table will be 32 characters. To retrieve the column name:

  • Browse to https://make.powerapps.com and select your environment.
  • Navigate to Data > Tables > SiteWorkLogs > Columns.
  • Look for the column that should be titled the same as your table (SiteWorkLogs). Copy the Name as shown in my example below, and put that into your compose expression. 

ChrisPiasecki_0-1616276812612.png

 

Compose expression:

outputs('List_rows')?['body/value'][0]['cr89f_siteworklogsid']

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

4 REPLIES 4
Mira_Ghaly
Dual Super User II
Dual Super User II

@PhilStanley 

From your screenshots above it looks like you are not passing the GUID to the Update Row action , so you need to pass SiteWorkLogsId instead of ID.

 

To get rid of your apply to each assuming that your List Records will return only 1 Record use the below in a compose data operation and pass it to update Row.

Compose Expression
outputs('List_rows')?['body/value'][0]['yourTableUniqueIdentifierColumnName']

Mira_Ghaly_0-1616210688613.png

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Thank you Mira for replying. I did as you suggested and got rid of the 'Apply to each' which is great.

I also used a compose statement to get the ID which gets the row number but I am still getting the same error. I have a screenshot showing the input of the 'Update a row 2' which all seems ok but the output is showing the error. Do you need any other info?

Thanks again for your assistance.

Bad Request2.png

ChrisPiasecki
Super User
Super User

Hi @PhilStanley ,

 

The unique identifier of your table will be 32 characters. To retrieve the column name:

  • Browse to https://make.powerapps.com and select your environment.
  • Navigate to Data > Tables > SiteWorkLogs > Columns.
  • Look for the column that should be titled the same as your table (SiteWorkLogs). Copy the Name as shown in my example below, and put that into your compose expression. 

ChrisPiasecki_0-1616276812612.png

 

Compose expression:

outputs('List_rows')?['body/value'][0]['cr89f_siteworklogsid']

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

Hi Chris. Thank you for your very detailed answer. I thought I was supposed to use the primary ID and was getting the correct row number. I didn't think it would work but thought I would try it and boy was I surprised. I had been trying many different permutations, going through numerous hours of videos and internet searches and you solved it straight away. You are my God and my saviour.

Many many thanks Chris for helping me out. It was the detailed info that really helped. I am so happy now.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors
Users online (3,344)