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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch , ForAll or what?
Power Apps
Answered

Patch , ForAll or what?

(0) ShareShare
ReportReport
Posted on by 96

I am designing a new Powerapp form for my office.  I created new form, attached my MAIN sharepoint list. Shown below.  I did successfully add a gallery and attached the seperate PrintSet list I want to use. 

Screen1.JPG

 

Below I attached my Main Sharepoint list that I use to create app above.  I would like to have the choicebox selected above, be recorded in the PrintSet column below.  I keep getting stuck trying to use Patch, ForAll and creating single checkboxes with the lookup formula.Screen2.JPG

 

Thank you for your help.

Screen2.JPG
Screen1.JPG
Categories:
I have the same question (0)
  • leyburn19 Profile Picture
    2,157 on at

    So the check boxes are inside the DataCard?

     

    What I do with that is I make the check boxes based on the Parent.Default.  So in you case it would be for each CheckBox and based on teh outcome needed something like:

     

    If(Parent.Default="8.5X11",true,If(Parent.Default="11X17",true,If(Parent.Default="17X22",true,If(Parent.Default="8.5X11",true,false))))

     

    Then the Textbox I would remove its Parent.Default and replace with something that matches like:

     

    If(CheckBox1.value=true,"8.5X11",If(CheckBox2.value=true,"11x17",Parent.Default))

     

    Patch is not needed for this unless teh Checkboxes are not bound to the datacard

  • AntwainPatrick Profile Picture
    96 on at

    Yes I placed the checkboxes inside the card so the app retains its nature flow.  I'll try your options and let you know what I get or how it responses in my app.

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @AntwainPatrick ,

    Do you want to update PrintSet column by using two check boxes's selections( one part the number, one part the unit)?

    If so, I suggest you try Concate function.

    Is PrintSet column a text column?

    If so, try this:

    1)Set every checkbox's OnCheck:

    ClearCollect(test,{num:Checkbox1.Text,value:Checkbox1.Value},
    {num:Checkbox2.Text,value:Checkbox2.Value},
    {num:Checkbox3.Text,value:Checkbox3.Value},
    {num:Checkbox4.Text,value:Checkbox4.Value},
    {num:Checkbox4.Text,value:Checkbox4.Value},
    {num:Checkbox5.Text,value:Checkbox5.Value},
    {num:Checkbox6.Text,value:Checkbox6.Value},
    {num:Checkbox7.Text,value:Checkbox7.Value},
    {num:Checkbox8.Text,value:Checkbox8.Value},
    {num:Checkbox9.Text,value:Checkbox9.Value},
    {num:Checkbox10.Text,value:Checkbox10.Value},
    {num:Checkbox11.Text,value:Checkbox11.Value},
    {num:Checkbox12.Text,value:Checkbox12.Value})

    2)Set the PrintSet's DataCard's UpDate:

    Concat(Filter(test,value=true),num)

    Here's mu test:72610.PNG

     

    Best regards,

    Community Support Team _ Phoebe Liu

     

  • AntwainPatrick Profile Picture
    96 on at

    The PrintSet column in the Sharepoint List is a text column.  I want to allow only a max of 2 selections to be made in PowerApp and applied back to the Sharepoint List. I have read about Concate function and I'll try that tonight.  Thank you for you input.  What exactly does the "test" mean in your function?...Is it the sharepoint or card?

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @AntwainPatrick 

    Are you still having issues with this?

     

    I believe some of the responses might have missed that you are working with a Gallery with one checkbox.

    This is a pretty straight-froward solution that only needs a couple bits of formula.

    It's based on the idea that when a user clicks on 2 items (as you indicated that was all they can have) the rest become disabled.  They can unclick on and then choose another, but the most they can choose is 2.

    Then, you need the concat'ed value of the checkbox in the Gallery.

    The Concept here is to first base the DisplayMode of the checkbox off of a helper value (we can't actually reference certain things inside a Gallery...such as AllItems - which is what we need).  SO, there exists a label outside of the Gallery (called HelperLabel) with this formula in the Text property:

       CountRows(Filter(Gallery4.AllItems, Checkbox2.Value))

     

    Then, on the Checkbox2, the DisplayMode property is set to:

       If(Value(HelperLabel.Text)=2 && !Checkbox2.Value, Disabled, Edit)

     

    Your CheckBox2 Default property should be set to:

       CheckBox2.Text in Parent.Default

     

    Finally, for your PrintSet_DataCard1 update property, this formula:

       Mid(Concat(Filter(Gallery1.AllItems, Checkbox2.Value), ", " & Checkbox2.Text),3)

     

    I've attached a sample app of this all working (minus the data sources and edit form), but it will demonstrate the easiest way to get where you're going.

     

    I hope it is helpful for you.

     

  • AntwainPatrick Profile Picture
    96 on at

    That was exactly what I was looking for. Thank you.  I'll test it out on my app but based on your example its definitely going to work.  This will help me finish off the edit form of app.  I'll have to play with the concat code to get it to write back into the single line text field in sharepoint.

     

    Again Thank you!!!

  • AntwainPatrick Profile Picture
    96 on at

    Randy is there a way to modify Gallery1.Selected.val  so that 11x17, PDF value is in Sharepoint list? The Mid(Concat(Filter(Gallery1.AllItems, Checkbox2.Value), ", " & Checkbox2.Text),3) kills the App.TestPrintLink3.JPGTestPrintLink2.JPG 

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @AntwainPatrick 

    Where are you putting the Mid(Concat(Filter(Gallery1.AllItems, Checkbox2.Value), ", " & Checkbox2.Text),3) formula?  It should be in the Update property of the datacard for the text column in your SharePoint list that you want to have reflect the value.

  • AntwainPatrick Profile Picture
    96 on at

    Okay I have placed that formula on the datacard but my Sharepoint is not updating properly.  With the basic Gallery1.selected.val I get a value but with the Mid(Concat(Filter(Gallery1.AllItems, Checkbox1.Value), ", " & Checkbox1.Text),3) the value space is left empty.  The Sharepoint column is formated for single line for text .

    TestPrintLink7.JPGTestPrintLink6.JPG

  • AntwainPatrick Profile Picture
    96 on at

    So I'm going back through the original formulas and I forgot to bring over the label data to my test app.  I'll have to restart and I'll post afterwards.

     

    Thanks Randy

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard