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

Community site session details

Session Id : Y5vD42Sprhe4tgp2ve4i6d
Power Apps - Building Power Apps
Answered

Change a Text Input value after Save on Check/Uncheck of a checkbox

Like (0) ShareShare
ReportReport
Posted on 9 Sep 2020 04:22:15 by 22

I have a customized SharePoint Form where if a checkbox is checked by an approver  a button is enabled to start a workflow by another team.  On unchecking it is disabled. The value of the checkbox is saved in a single line of text in SharePoint list. On checking the text field in SharePoint is marked as checked.

 

I have put OnCheck of the checkbox property to assign a variable varCheck as "Checked'" and OnUncheck as Blank().  The Approver can uncheck and recheck the checkbox even after it has been  saved as "Checked" in SharePoint list in column AllowWF, till the button is clicked to submit to workflow,

 

What default should be put in the Text Input box so that Checkbox changes are reflected in the Text Input box through out. After the workflow the checkbox will remain checked.

 

I try to put OnEdit of SharePoint Integration by Set(varCheck,SharePointIntegration.Selected.AllowWF) and putting the default for the Text Input to varCheck if the status is before flow and Parent.Default after the flow, but the desired results are not coming. The variable on ititial seeting remains blank even if the field is "Checked". Main point is that it should be able resave as Blank or "Checked" depending on the value of checkbox.

 

Categories:
  • jaimat Profile Picture
    22 on 14 Sep 2020 at 17:21:52
    Re: Change a Text Input value after Save on Check/Uncheck of a checkbox

    I just realize the default value for text input box : If(var,varCheck, SharePointIntegration.Selected.AllowWF ) does not work on new form. Since there is no record created in the list in new form SharePointIntegration.Selected.AllowWF takes the text input value of the e1st record and accordingly the checkbox opens checked or unchecked. 

     

    We want it to always open unchecked. What changes to be made for that

  • jaimat Profile Picture
    22 on 12 Sep 2020 at 23:43:43
    Re: Change a Text Input value after Save on Check/Uncheck of a checkbox

    Just to clarify the above I changed 'Checked' to 'Yes' to complement  with 'No', as the Blank was somehow not saving. 

     

    Thanks again.

     

  • jaimat Profile Picture
    22 on 12 Sep 2020 at 23:10:23
    Re: Change a Text Input value after Save on Check/Uncheck of a checkbox

    Wonderful!! This is a perfect solution. Thanks a lot for this quick resolution, that was  urgently require to complete an app. Just one question. When I unchecked the checkbox, the text input was correctly reflecting Blank, but in was not saving to the SharePoint list column which remained 'Yes' after saving. I had to change  it to 'No' in place of Blank() to save it to the list. 

     

    Can it be written to the list as Blank to replace "Yes" on saving the form again.

     

    Thanks again for the solution.

  • Verified answer
    v-yutliu-msft Profile Picture
    on 11 Sep 2020 at 03:19:16
    Re: Change a Text Input value after Save on Check/Uncheck of a checkbox

    Hi @jaimat ,

    Maybe you should use "SharePointIntegration.Selected.AllowWF" to set the checkbox's deafult and textinput's default.

    Try to set like this:

    1)Checkbox's Default:

    If(SharePointIntegration.Selected.AllowWF="Checked",true,false)

    2)checkbox's OnCheck:

    Set(var,true);Set(varCheck,"Checked");Reset(textinputname)

    3)checkbox's OnUncheck:

    Set(var,true);Set(varCheck,Blank());Reset(textinputname)

     4)set the textinput's Default:

    If(var,varCheck,
     SharePointIntegration.Selected.AllowWF
    )

     //Then at the beginning, the checkbox and the textinput display based on the field value.

    If you make any change on that checkbox, the textinput's default will display based on the variable.

     

     

    Best regards,

  • jaimat Profile Picture
    22 on 10 Sep 2020 at 14:22:00
    Re: Change a Text Input value after Save on Check/Uncheck of a checkbox

    Thank you very much for the response. The solution is alright till it is Saved. But when the user saves the form the SharePoint list column is updated with "Checked" value. But when the form is opened again (may be after  a day or two) the variable is blank due to new session and the text input shows blank in place "Checked" and consequently the checkbox remains unchecked. The user should be able to Change the value till it is placed in the workflow.

     

    I tried setting varCheck  at SharePointIntegration OnEdit event like Set(varCheck,SharePointIntegration.Selected.AllowWF) but the variable remains blank and consequently the text input  and checkbox value remains empty when the forms loads again.  Why should the variable remain blank at this stage when the column has got value "Checked". Putting Set(varCheck,SharePointIntegration.Selected.AllowWF)  OnVisible also keep the variable blank on reload unless of course, I recheck the checkbox (in both the above cases). AllowWF is the SharePointlist text column name to save the value.

     

    Looking for a solution on specifically on reload of the form!!

  • v-yutliu-msft Profile Picture
    on 10 Sep 2020 at 06:18:46
    Re: Change a Text Input value after Save on Check/Uncheck of a checkbox

    Hi @jaimat ,

    Do you mean that:

    1)you use a checkbox's OnUncheck and OnCheck to set a variable?

    2)you set a textinput's Default to that variable?

    3)your textinput could not reflect the checkbox's changing ?

    If so, I suggest you add an action about resetting the textinput. Then even if you change the value of the textinput, it will return to the variable value.

    Try to set like this:
    1)checkbox's OnCheck:

    Set(varCheck,"Checked");Reset(textinputname)

    2)checkbox's OnUncheck:

    Set(varCheck,Blank());Reset(textinputname)

     3)set the textinput's Default:

    varCheck

     

     

    Best regards,

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2