cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

Patch record columns with values from multi-select combobox

I have a ComboBox where 1 or 2 people can be selected.   I am populating 4 fields in the same record with the information from the ComboBox.    When I first wrote this collect, it was working.  At some point it stopped working correctly and if only 1 person is selected in the ComboBox I get all 4 fields populated with the information from the 1st selection.    I have determined that it's due to the lack of the delimiter when only a single choice is made.

 

 

Collect(
    colTempSC,
        {
            cr9f7_name: Concat(ComboBoxMondays.SelectedItems.DateDisplay, DateDisplay & "; "),
            cr9f7_primarycontact: First(ComboBoxPrimaryContact.SelectedItems).Email,
            cr9f7_pcname: First(ComboBoxPrimaryContact.SelectedItems).Title,
            cr9f7_primarycontact2: Last(ComboBoxPrimaryContact.SelectedItems).Email,
            cr9f7_pc2name: Last(ComboBoxPrimaryContact.SelectedItems).Title,
            cr9f7_backupcontact: DropdownBackupContact.Selected.Email,
            cr9f7_bcname: DropdownBackupContact.Selected.Title,
            cr9f7_escalationmanager: DropdownEscalationManager.Selected.Email,
            cr9f7_emname: DropdownEscalationManager.Selected.Title,
            cr9f7_schedulenotes: RichTextEditorScheduleNotes.HtmlText,
            cr9f7_team: DropdownTeam.Selected.Title,
            cr9f7_region: DropdownTeamArea.Selected.Value,
            cr9f7_teamname: DropdownTeam.Selected.Title & " " & DropdownTeamArea.Selected.Value,
            cr9f7_teamrotation: DropdownTeam.Selected.ScheduleRotation
                      
        }
    )
);

 

 

I thought about wrapping the collect in this, but this only allows for the first selected item in the ComboBox.

 

 

With({_sel: Last(FirstN(ComboBoxPrimaryContact.SelectedItems, 1))},

 

 

I could collect the item without any Primary Contact 2 information and then Update if the 2nd selection exists, but I am hoping there is a way to do it all in a single collect.

 

Any ideas or suggestions would be welcome.

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
0 REPLIES 0

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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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
Top Kudoed Authors
Users online (1,880)