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
Super User

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
Super User

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.

WarrenBelz
Super User
Super User

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,364)