cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thatakke
Helper II
Helper II

Patching Combo box multiple selection to a single column

Hello,

 

My app stop working properly for some reason. It's been working as expected for a week, but suddenly it stopped patching the Combo Box selected items to my SharePoint list. I've seen a number of posts on this forum that answer this but they often have a separate patch function for the Combo Box. I'm still quite new to PowerApps, so I'd be grateful if you can explain in a simple language.

 

I'm pasting my whole patch function below, Nationality and Travel Countries columns in my SPList are multiple choice columns and they both have a list of countries. What I would like it to do and what it used to do was to add each selected country one by one to each column. 

 

Thank you

 

Set(
        LastCreatedID,
//this allows me to check whether people are already on the list
        Patch(
            'SPList',
            If(
                IsBlank(LastCreatedID),
                Defaults('SPList'),
                LookUp(
                    'SPList',
                    ID = LastCreatedID
                )
            ),
            {
            'Name of the Person': appuser.FullName,
            Job: JobTitle.Text,
             Nationality: ComboBox2.SelectedItems.Value,
            'Travel Countries': DataCardValue8.SelectedItems.Value,
            },
        ProfileForm.Updates,
        WorkForm.Updates,
        SkillForm.Updates,
        SummaryForm.Updates
        ).ID
    )

 

5 REPLIES 5
BrianS
Super User
Super User

Assuming that your SharePoint column is a "MultiSelect" column I would try 

Nationality: ComboBox2.SelectedItems

I believe that column wants the entire record for each item selected

thatakke
Helper II
Helper II

Hi @BrianS 

Thank you very much for your response. I'm afraid, removing the "Value" part is giving me an error. You were right about it being a multiple-choice column though. 

BrianS
Super User
Super User

That is odd - The syntax I sited is correct. What is the error you are receiving?

Thanks @BrianS 

 

I'm actually not sure what's wrong. It was working literally yesterday, and I've received a few data entries already. Only this morning I realised some people's nationality and travel countries are missing, when I checked the app in the back end, I realised the patch buttons (I have two separate) have a little error mark on them. Now I'm getting these errors. I really have no idea what went wrong as I'm the only one who can access the back end. Any suggestions?

 

thatakke_0-1634302386270.png

 

BrianS
Super User
Super User

I would try 

Nationality: ComboBox2.SelectedItems.Text

Since that is what it is asking for - see what that does. This is odd behavior. I wonder if Microsoft changed something.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,894)