web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Assistance with a Data...
Power Apps
Unanswered

Assistance with a DataCard - rule?

(0) ShareShare
ReportReport
Posted on by 829

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",
 Value:"New"},{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
 Value:"Updated"})

 

Categories:
  • panand99 Profile Picture
    641 on at

    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)

     

  • simms7400 Profile Picture
    829 on at

    @panand99 

     

    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.

  • simms7400 Profile Picture
    829 on at

    Hi -

     

    Just wanted to bring this to the top, thanks!

  • simms7400 Profile Picture
    829 on at

    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".

     

    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard