Showing results for 
Search instead for 
Did you mean: 
Level 8

Assistance with a DataCard - rule?

Hi Folks -


I have a PowerApps application that I have built that connects to SharePoint lists. I have one field called "RequestStatus".


For any new submissions, this fields is populated with "New" while if a data element already exists, it means the user is submitting a change request, and therefore it's updated with "Updated".


However, the caveat is, if a user submits a NEW request, but then goes back in and updates that NEW request, the field is then set to "Updated", which causing some trouble fo rmy backend Ms Access processing.


Is there a way to edit the following code to add in a peice that essentially says if the field is alreay set to New, leave as is and DONT set to Updated?


Thank you!


If(AssetEditForm.Mode = New,{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",


Level 10

Re: Assistance with a DataCard - rule?

Hi @simms7400 


Could you please explain when you needs to set the value of requeststatus to "Updated"?


Is it from any action?


you can use on the defualt value- If(AssetFormMode.Mode=FormMode.New,"New",ThisItem.RequestStatus)


Level 8

Re: Assistance with a DataCard - rule?



Thank you for the reply!


So, the process is as follows.

If a user submits a new request via PowerApps, the field RequestStatus is populated with New, which is correct.  Howevr what is happening is after the new reuqest is submitted, that same user is going back in PowerApps and pulling up the newly requested code to make a change to one of the attributes they originally requested. Therefore, the RequestStatus fields now gets set to Updated.  Which is fine for ANY OTHER case where a change request is being submitted. However, what I need to check is if the data element being edited has a RequestStatus of New, keep as is. I need to add that part of the logic into the code. Is this possible?


So if a user goes in an edits an already existing code that isn't new, the RequestStatus ets set ot Updated which is expected behavoir.  But as I said earlier, my access model is throwing errors when a New data element is added, and then immediately edited.

Level 8

Re: Assistance with a DataCard - rule?

Hi -


Just wanted to bring this to the top, thanks!

Level 8

Re: Assistance with a DataCard - rule?

Hi -


As a follow up, I need to modify the code I attached above ot first check if the RequestStatus is already set to "New". If so, keep as is, else set to "Updated".



Helpful resources


Power Apps Super User Class of 2020

Check it out!


Power Apps Community User Group Member Badge

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


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


Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,685)