cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

PowerAppa Form- Hide fields while in approval

hi,

I have a powerapp form. It's an application form. Except fileds imported from sharepoint online list, I also add a checkbox and a submit button. When an applicant submit the form, an approval will start.

Now, when approver open the item link,  the checkbox and the button can still be edited, and the checkbox value=false though applicant has checked the box. So is there any solution to this problem?

And I also want to hide the submit button while the approver open the item link ,is it possible ?

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
QJappie22
Resolver II
Resolver II

Hey @Anonymous ,

 

Exactly like @Anonymous says. Make sure you have a column in SharePoint with the name Status and you can either choose to make this a dropdown column with for example the options 'new', 'under approval', 'approved' and 'not approved' (recommended), or a Text column which u can fill manually. Your approval can be started with Flow and before the step 'Start and wait for an approval' is executed u can add a step that changes the status. As @Anonymous mentioned you can use the Displaymode option of the Button and the checkbox to add a code like:

 

If(Status.Value = "under approval", Disabled, Edit)

Or if you don't want the Button to be visible add this code to the Visible option:
Status.Value <> "under approval"

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Is there a field in your sharepoint that stores the status? If so, you could use the "DisplayMode" value of the button, the code would look something like this. 

 

If(Status = "Under Approval", DisplayMode.Disabled, DisplayMode.Edit)
QJappie22
Resolver II
Resolver II

Hey @Anonymous ,

 

Exactly like @Anonymous says. Make sure you have a column in SharePoint with the name Status and you can either choose to make this a dropdown column with for example the options 'new', 'under approval', 'approved' and 'not approved' (recommended), or a Text column which u can fill manually. Your approval can be started with Flow and before the step 'Start and wait for an approval' is executed u can add a step that changes the status. As @Anonymous mentioned you can use the Displaymode option of the Button and the checkbox to add a code like:

 

If(Status.Value = "under approval", Disabled, Edit)

Or if you don't want the Button to be visible add this code to the Visible option:
Status.Value <> "under approval"

View solution in original post

Anonymous
Not applicable

I just create that column, but I don't know where to add the code.  When I edit the Displaymode of the submit button,it doesn't show "Status" or other relevant choices. When I change "Status" into datacardvalue.selected.value, it also goes wrong. Canyou tell me how to write the code?

Thx!

Are the Checkbox and the Submit Button inside of the Form you're using? If so, you can use:

 

ThisItem.Status.Value


If the controls are outside of the Form you can place them inside by adding a Custom Card to your Form and placing the control inside that DataCard. Then you'll be able to use the above code.

 

If you are still not able to see Status, try to refresh the DataSource in the PowerApp by clicking View->Data sources->three dots of the source->Refresh.

 

I hope this will help you 🙂

 

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,306)