cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pnewell
New Member

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

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
Helper V
Helper V

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

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.

 

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()
});

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,870)