cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sheila33496
Frequent Visitor

Populate Status text field on SharePoint List Form based on Display Mode

I have a SharePoint List Power Apps form with a text field called "Status" . The "Status" field is blank when form is opened. I want the "Status" field to change to "Pending" once the form is first submitted. Then, when the Approver comes in and clicks on the checkbox and saves again, I want the status field to go to "Completed".

 

Perhaps the display modes aren't even the right way to go on this. 

 

Can someone please help me with this AND please be very detailed as I am new to PowerApps (Infopath was so much easier!) Screenshots are always appreciated as well! Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @sheila33496 ,

Assuming the checkbox is inside your form, you need to simply change the Status field on the basis of the Checkbox OnCheck property. First set a Variable

UpdateContext(
   { 
      varStatus:
      If(
         IsBlank(ThisItem.Status),
         "Pending",
         "Completed"
      )
   }
);
Reset(YourStatusTextControlName)

On the Default of your Status Text Control - set to the Variable if it is present (otherwise show the current field value)

If(
   !IsBlank(varStatus),
   varStatus,
   Parent.Default
)

Lastly, on the end of your Save code and Screen OnVisible reset the variable.

UpdateContext({varStatus:Blank()})​

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

2 REPLIES 2
WarrenBelz
Super User III
Super User III

Hi @sheila33496 ,

Assuming the checkbox is inside your form, you need to simply change the Status field on the basis of the Checkbox OnCheck property. First set a Variable

UpdateContext(
   { 
      varStatus:
      If(
         IsBlank(ThisItem.Status),
         "Pending",
         "Completed"
      )
   }
);
Reset(YourStatusTextControlName)

On the Default of your Status Text Control - set to the Variable if it is present (otherwise show the current field value)

If(
   !IsBlank(varStatus),
   varStatus,
   Parent.Default
)

Lastly, on the end of your Save code and Screen OnVisible reset the variable.

UpdateContext({varStatus:Blank()})​

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

WarrenBelz
Super User III
Super User III

Hi @sheila33496 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,500)