cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pnewell
Level: Power Up

Powerapps not updating a record in CDM

We have a powerapps application that collects data and writes it to various tables in CDM. When it is complete it updates another table to indicate that the task was complete.

Even though the application is able to write the records to the various tables, the powerapp only intermittently  updates the task record.  

UpdateContext({SendProgress:Concatenate("Setting Task ",WorkBrowseGallery.Selected.TaskId, " Status to Complete!")});

UpdateIf('LIS GA Task',TaskId = WorkBrowseGallery.Selected.TaskId,

  { TaskStatus: "Complete",  FinishedDate: Now() });

The message appears on the screen showing the correct selected taskid. However, the record is not updated.

 

Any suggestions on how we can insure that the record is always updated?

 

1 ACCEPTED SOLUTION

Accepted Solutions
pnewell
Level: Power Up

Re: Powerapps not updating a record in CDM

We changed the code from Refresh to Revert and it is working now.

 

Revert('LIS GA Task');
UpdateIf('LIS GA Task', TaskId = WorkBrowseGallery.Selected.TaskId,
{ TaskStatus: "Complete",
FinishedDate: Now()
});

View solution in original post

3 REPLIES 3
Leo09
Level 8

Re: Powerapps not updating a record in CDM

By tables, did you mean entities? I see in the UpdateIf formula you only included one entity.

pnewell
Level: Power Up

Re: Powerapps not updating a record in CDM

Yes it is the entity in CDM. We are getting an error message about Optimistic Concurrency Control.

We assumed that if we refreshed the entity in powerapps before the update that it would resolve the issue.

 

Refresh('LIS GA Task');

UpdateIf('LIS GA Task', TaskId = WorkBrowseGallery.Selected.TaskId,

               { TaskStatus: "Complete",

               FinishedDate: Now()

                              });

 

However, it is still failing. Any suggestions on how to resolve this issue would be appreciated.

 

pnewell
Level: Power Up

Re: Powerapps not updating a record in CDM

We changed the code from Refresh to Revert and it is working now.

 

Revert('LIS GA Task');
UpdateIf('LIS GA Task', TaskId = WorkBrowseGallery.Selected.TaskId,
{ TaskStatus: "Complete",
FinishedDate: Now()
});

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 343 members 5,629 guests
Please welcome our newest community members: