Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

multi values not patching to SharePoint list

(0) ShareShare
ReportReport
Posted on by 96

Forum,

I have checkbox in gallery properly coded to update Sharepoint list.  The issue I'm having it getting the Sharepoint list to accept multiple selection.  See attached.

 

Thanks for your help.

TestPrintLink.JPGTestPrintLink2.JPG

 

  • AntwainPatrick Profile Picture
    AntwainPatrick 96 on at
    Re: multi values not patching to SharePoint list

    This formula you posted is absolutely correct.  Although it will not work within an edit form.  So I'm creating a fully custom app with data source connected but not attached to any datacards.  

     

    Thank you for your patience and help.

  • AntwainPatrick Profile Picture
    AntwainPatrick 96 on at
    Re: multi values not patching to SharePoint list

    Okay here's my layout:

     

    Sharepoint list, Print is a single text column:Sharepoint_ProjectHeader.JPG

    DataCard and Gallery Update:GalleryInsideFormInsideDataCard.JPG

    Checkboxes:

    Checkbox.JPG

     

     

    Datacard:

    PrintDataDefaultUpdate.JPG

     

    I pretty much stuck here.  I did read that Gallery checkbox will not work inside forms.  I'm going to try it outside the form but I thought you could place datacard with edit forms.

     

    https://baizini-it.com/blog/index.php/2018/01/15/powerapps-how-to-update-sharepoint-choice-and-lookup-type-columns-with-patch/

     

     

    Thank you again....lololol

  • v-xida-msft Profile Picture
    v-xida-msft on at
    Re: multi values not patching to SharePoint list

    Hi @AntwainPatrick ,

    Could you please share a bit more about your issue?

    Where do you have face your issue?

     

    Based on the issue that you mentioned, I think the solution I provided above could achieve your needs. The screenshot as below:5.JPG

     

    6.JPG

    Set the Update proprety of the Printing Data card in your Edit form to follownig:

     

    Concat(Filter(Gallery1.AllItems, Checkbox1.Value = true), Checkbox1.Text & ",")

    Set the Update property of the StartUp Data card in your Edit form to following:

    Concat(Filter(Gallery4.AllItems, Checkbox3.Value = true), Checkbox3.Text & ",")

    Please consider take a try with above solution, check if the issue is solved.

    Note: Please make sure the Printing column and StartUp column are both Single text type columns in your SP list.

     

    Best regards,

  • AntwainPatrick Profile Picture
    AntwainPatrick 96 on at
    Re: multi values not patching to SharePoint list

    Maybe I'm an idiot but I can't get it to work. See attached if you have time.  I'm pretty much stumped at this point.

     

    Thanks 

    Antwain

  • v-xida-msft Profile Picture
    v-xida-msft on at
    Re: multi values not patching to SharePoint list

    Hi @AntwainPatrick ,

    Yes, you can. Wthin your Edit form, you could set the Update property of the Printing Data card to following:

    Concat(Filter(Gallery1.AllItems, Checkbox1.Value = true), Checkbox1.Text & ", ")

     

    Please take a try with above solution, check if the issue is solved. If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

     

    Best regards,

  • AntwainPatrick Profile Picture
    AntwainPatrick 96 on at
    Re: multi values not patching to SharePoint list

    Quick question.  Could I place: 

    Concat(Filter(Gallery1.AllItems, Checkbox1.Value = true), Checkbox1.Text & ", "),

     On the datacard already attached to the Printing column in Sharepoint?  That way when I Submit form the selections are automatically placed in the list.  If I had wanted to create app with 12 to 30 seperate cards I'd be lost writing code on the Submit button.

  • Verified answer
    v-xida-msft Profile Picture
    v-xida-msft on at
    Re: multi values not patching to SharePoint list

    Hi @AntwainPatrick ,

    Do you want to pass multiple Checkbox values from your Gallery to the Single text column in your SP list?

     

    Based on the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:

    Please consider modify your formula within the OnSelect property of the "Submit" button as below:

    Patch(
     TestPrintLink,
     Defaults(TestPrintLink),
     {
     Printing: Concat(Filter(Gallery1.AllItems, Checkbox1.Value = true), Checkbox1.Text & ", "),
    StartUp: Concat(Filter(Gallery4.AllItems, Checkbox2.Value = true), Checkbox2.Text & ", ") } )

    Note: The Checkbox1 represents the Checkbox in your Gallery1, the Checkbox2 represents the Checkbox in your Gallery4.

    More details about the Concat function, please check the following article:

    Concat function

     

    In addition, the Reset(...) formula you typed within the OnSelect property of the Button would not reset the Checkboxs within your two Gallerys (Gallery1 & Gallery4).

    If you want to reset Checkboxs within your two Gallerys after you press the "Button", please consider take a try with the following workaround:

    set the OnSelect property of the "Submit" button as below:

    Patch(
     TestPrintLink,
     Defaults(TestPrintLink),
     {
     Printing: Concat(Filter(Gallery1.AllItems, Checkbox1.Value = true), Checkbox1.Text & ", "),
    StartUp: Concat(Filter(Gallery4.AllItems, Checkbox2.Value = true), Checkbox2.Text & ", ") } );
    Set(IsReset, false); /* <-- Add formula here */
    Set(IsReset, true) /* <-- Add formula here */

    Set the Reset property of the Checkbox1 in your Gallery1 and the Checkbox2 in your Gallery4 both to following formula:

    IsReset

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • AntwainPatrick Profile Picture
    AntwainPatrick 96 on at
    Re: multi values not patching to SharePoint list

    Unfortunately I did post two seperate formula line with the mid() formula. One was on a button and the other on the actual datacard.  I tried attaching the formula to the datacard and it gave me the following error:

    TestPrintLink5.JPG

    I know placing Gallery1.Selected.val  on the datacard will return a single checkbox selection to the Sharepoint list. 

  • Jeff_Thorpe Profile Picture
    Jeff_Thorpe 6,085 on at
    Re: multi values not patching to SharePoint list

    It looks like you have the correct formula in the previous screenshot but it just needs to be used in the patch().

     

    Example:

    Patch(TestPrintLink, Defaults(TestPrintLink), {Printing: Mid(........)})

     

    The mid(...) is what you have in the previous screenshot.

  • AntwainPatrick Profile Picture
    AntwainPatrick 96 on at
    Re: multi values not patching to SharePoint list

    Yes.  I'd like to select 11x17 and PDF checkboxes and have it write back to Sharepoint list in column like: 11x17,PDF.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard