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 / Appending to multiple ...
Power Apps
Answered

Appending to multiple choice SharePoint List column from PowerApps

(0) ShareShare
ReportReport
Posted on by 8

Hello,

 

I have what will probably be a simple issue for someone more experienced in PowerApps than me. I've done a bit of research and experimentation but so far I've not arrived at a solution. I'll try to be clear in my explanation.

 

I have a SharePoint list and a PowerApps Canvas App. The SharePoint list contains two Choice-type columns that allow multiple choices; we shall call them "Column 1" and "Column 2". The set of possible choices is pre-defined and is the same for both columns; no user-input choice is allowed. Let's denote these choices as "Choice 1", "Choice 2", ... , "Choice N", where N is the number of choices.

 

What I would like to do is, in the Canvas App, display a dropdown where the user can select one of the choices, Choice X (whichever). Next to the dropdown I would like to place a button that when pressed adds, for each record, Choice X to Column 2 if Choice X is already in Column 1.  When I say "add" I mean it in the sense that Choice X is "appended" to Column 2; that is, Column 2 retains all selected choices it previously had and Choice X is added to it.

 

My current and perhaps most promising approach was to do so through the UpdateIf function. Choice X is selected in ChoiceDropdown. Then the AddChoiceButton has the following OnSelect function:

UpdateIf(SharePointList,ChoiceDropdown.Selected.Value in 'Column 1'.Value, {'Column 2': ...} )

I've been unable to decipher the proper syntax to achieve what I want: add Choice X as a selected choice in Column 2 alongside all previously selected choices in that column.

 

Is this approach viable? If the answer is yes, could someone explain the correct syntax for my goal or point to a resource where it's explained? If the answer is no, I would appreciate it very much if someone provided a new solution or pointed me in the right direction.

 

Cheers,

Andrés

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @AndresP 

    Yes, this is all possible - but, question first...are you looking to do this for every record in your list, or just a subset of them (i.e. meets certain conditions)?

  • AndresP Profile Picture
    8 on at

    @RandyHayes 

     

    Thanks for your answer; it gives me hope.

     

    I'm looking to update only a subset of records in my list: those that have in Column 1 the choice ("Choice X" in my original post) selected in the Dropdown ("ChoiceDropdown"). That's why the condition in my UpdateIf function is 

    ChoiceDropdown.Selected.Value in 'Column 1'.Value

    That is, if the value (choice) selected in the PowerApps's Dropdown is in Column 1 for a given record, then add that same value in Column 2 alongside all previous values for that record.

     

    Regards,

    Andrés

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

    @AndresP 

    Before I throw a formula at you...tell me about record counts.  Are you dealing with a list that has (or will have) over 2000 records?  If so, then delegation needs to be taken into account.

  • AndresP Profile Picture
    8 on at

    @RandyHayes 

    Currently, no. It's a list with a 115 records and we don't expect it to grow that much; at least not to 2000.

     

    Thanks,

    Andrés

  • AndresP Profile Picture
    8 on at

    Hey,

     

    An update here. I couldn't find a way to achieve my purpose only through Power Apps. I ended up solving the issue through a Power Automate Instant Flow.

     

    I'd still be interested in knowing if it was possible through Power Apps, but for the time being, the issue is solved.

     

    Cheers, 

    Andrés

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

    @AndresP 

    Yes...sorry for the delay in response.

     

    In PowerApps, you would achieve this with:

    Patch(SharePointList,
     ForAll(Filter(SharePointList, ChoiceDropdown.Selected.Value in 'Column 1'.Value) As _item, 
     {ID: _item.ID,
     'Column 2': 
     Ungroup(
     Table({choice: [ChoiceDropdown.Selected.Value],
     {choice: _item.'Column 2'}
     ),
     "choice"
     )
     } 
     )
    )

     

    This would add the selected value to Column 2 (retaining the column 2 values) for all records in the list that have the selected value in column 1.

     

    The only part of this which is not delegable is the in operator in the Filter.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard