cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
livingstonep
Level 8

cannot set SharePoint item Status from PowerApps Submit button

We have a SharePoint List and one of the fields is a scalar Text field called Status.

 

We are editing the list (New, Edit) with a PowerApps form.

 

On Save of the form, we just want to save, with the Status field being "New"

 

In our Submit Button, we want to change the Status to Pending review so that it will trigger our Flow...plus the record should become read-only.

 

But we cannot get the Status chanegd to pending review in the list item/record.

 

How can we do this

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: cannot set SharePoint item Status from PowerApps Submit button

Hi @livingstonep,

 

Like @tchin-nin asked, it's quite confusing about your description here:

On Save of the form, want to save with the Status field being "New"

In Submit Button, want to change the Status to Pending review.

 

In PowerApps custom Form in SharePoint list, there is only one save button, which is used to submit and save the item in the Form. 

Capture.PNG

 

Or did you mean that on NewForm mode, you want to save the Status field with "New", and on EditForm mode, you want to save the Status field with "Pending review"? Also, when in EditForm mode, you want to make the label to read-only?

 

If so, then you could set the OnNew/OnEdit property of the SharePointIntegration to:

SharePointIntegration.OnNew=NewForm(SharePointForm1);Set(V,"New");Set(X,DisplayMode.Edit)
SharePointIntegration.OnEdit=EditForm(SharePointForm1);Set(V,"Pending review");Set(X,DisplayMode.View)

Capture.PNG

 

 

Then set the Default property of the Status field's label control to:

V

Similarly, set the DisplayMode property of the Status field's label control to:

X

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: cannot set SharePoint item Status from PowerApps Submit button

Hi,

The best way to do this is probably to assign the Default property of your Status DataCard to a variable. Then set the variable to the value you want and set the status DataCard display mode to view, so the user cannot change the status value. 

 

First of all, are you building an entire App based on your SharePoint list ? Or are you customizing your SP list's form with PowerApps ?

Can you tell more about your scenario ?

For a new item, Status should be "New" ? You have different button "save" and "submit", save : status stay New (kind of draft?), Submit : status changed to Pending review, and a flow is launched ?

 

Théo

 

 

Community Support Team
Community Support Team

Re: cannot set SharePoint item Status from PowerApps Submit button

Hi @livingstonep,

 

Like @tchin-nin asked, it's quite confusing about your description here:

On Save of the form, want to save with the Status field being "New"

In Submit Button, want to change the Status to Pending review.

 

In PowerApps custom Form in SharePoint list, there is only one save button, which is used to submit and save the item in the Form. 

Capture.PNG

 

Or did you mean that on NewForm mode, you want to save the Status field with "New", and on EditForm mode, you want to save the Status field with "Pending review"? Also, when in EditForm mode, you want to make the label to read-only?

 

If so, then you could set the OnNew/OnEdit property of the SharePointIntegration to:

SharePointIntegration.OnNew=NewForm(SharePointForm1);Set(V,"New");Set(X,DisplayMode.Edit)
SharePointIntegration.OnEdit=EditForm(SharePointForm1);Set(V,"Pending review");Set(X,DisplayMode.View)

Capture.PNG

 

 

Then set the Default property of the Status field's label control to:

V

Similarly, set the DisplayMode property of the Status field's label control to:

X

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps 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

Top Solution Authors
Top Kudoed Authors
Users online (5,963)