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 / Patching all contents ...
Power Apps
Answered

Patching all contents of a combo box that have been selected

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello All,

 

I have a request form and one of the required fields is a "Region" Combo box in which they can select more than 1 option. I am trying to Patch all the items selected.

 

I am currently using the code to Patch all the required fields. I understand that I am only putting "Region: RegionInput.Selected" as the code, but "SelectedItems" comes up as an error.

 

CURRENT CODE FOR WHOLE PATCHING (This one only shows the first item selected and not all items selected fro "Region"):

 

Patch('Training Requests',Defaults('Training Requests'),
{Title: "Training Requests",
TrainingPOC: User().FullName,
MicrosoftEmail: EIDText_Input.Text,
DateRequested: Text(Today(), "[$-en-US] mmmm dd, yyyy"),
TrainingDeploymentDate: DatePicker1.SelectedDate,
TrainingMaterial: TrainingMText_Input.Text,
MaterialLink: MaterialLText_Input.Text,
Process: Dropdown1.Selected,
LOB: LOBText_Input.Text,
Region: RegionInput.Selected,
ShiftSchedule: ShiftSText_Input.Text,
Comments: 'CommentBox_Confi.'.Text,
NumberOfTrainees: Value(NumbOfTrain_Input.Text)});

 

Anyway I can patch all the items selected in the combo box?? including a comma if that is possible.

 

Any help is appreciated,

Mono

 

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    In the field's, in OnChange property, start a collection.

    Collect(arrRegion,
    ForAll(
    Filter(
    [List Name that contains Region],
    [Region Field of The List] = [DataCard that user select Region].SelectedText.Value
    ),
    [property you want to display]
    )
    )

    After, you will need to use the concat function in your patch. 

    Concat(Distinct(arrRegion, [Field]); Result & "; ")

    The ";" is the delimiter.

     

    I did this with submitform, try with patch and tell me! (:

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous  Thanks for the advice! Going to try it ASAP. Quick question, in which "OnChange" will I be putting the Collect? On the "Next" button of my Request Form?

     

    Region Collect_LI.jpg

     

    Thank You!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    From the field the user selects the region.
    I have to change my field to combobox, dropdown doesn't work!
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Okay, I am trying to Collect the items...... only one problem that I am trying to solve:

     

     

    Region Collect Code.PNG

     

    All works... except for the equal sign? I've tried a few different things so far and it's not working.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    RegionInput is a dropdown?
    RegionInput.SelectedText.Value

    The field Region in your database is what kind?
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Region field is a combo box so that the User can select more than one option. I want to Patch all the options selected into my SharePoint List.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    The "Region" field in my SharePoint List is a Choice column.

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Have you enabled "Allow multiple options" option for the "Region" field in your SP List?
    Could you please share more details about the formula you typed within the Items property of the RegionInput ComboBox?

     

    Based on the issue that you mentioned, I think there is something wrong with your formula. Please consider modify your formula as below:

    Patch(
     'Training Requests',
     Defaults('Training Requests'),
     {
     Title: "Training Requests",
     TrainingPOC: User().FullName,
     MicrosoftEmail: EIDText_Input.Text,
     DateRequested: Text(Today(), "[$-en-US] mmmm dd, yyyy"),
     TrainingDeploymentDate: DatePicker1.SelectedDate,
     TrainingMaterial: TrainingMText_Input.Text,
     MaterialLink: MaterialLText_Input.Text,
     Process: Dropdown1.Selected,
     LOB: LOBText_Input.Text,
     Region: ForAll( // Modify formula here
     RegionInput.SelectedItems,
     {
     Value: DisplayColumn // Displaycolumn represents the column you used as display value within the RegionInput
     }
     ),
     ShiftSchedule: ShiftSText_Input.Text,
     Comments: 'CommentBox_Confi.'.Text,
     NumberOfTrainees: Value(NumbOfTrain_Input.Text)
     }
    );

    Note: Please make sure you have enabled "Allow multiple selections" option for the Region Choice column in your SP List already. If not, please enable the "Allow multiple selections" option for the Region Choice column in your SP List, then refresh the SP list connection in your app manually to apply changes.

     

    If you do not enable "Allow multiple selections" option for the Region Choice column in your SP List, you could not patch multiple options back to the Region field from your app.

     

    Best regards, 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-xida-msft  That was my problem. I did not change it to allow multiple choices. Thanks for the help!

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 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard