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 / Update a choice column...
Power Apps
Answered

Update a choice column from an independent collection

(0) ShareShare
ReportReport
Posted on by 48

Hi,
I have a choice column. In some cases I want to update it with a set of values from a collection I created instead from the original option that comes with that card.
I created a dropdown with the collection and have put it inside the relevant data card.
Then I wrote this in the Update property:

 

If(
 Condition (working),
 DataCardValue17.Selected, // the original choice from the original data card combo box (working)
 {value: DataCardValue17_2.SelectedText.Value} // what I'm trying to insert from the dropdown with the collection (not working) 
)

I also tried:
DataCardValue17_2.Selected in the 3rd line instead.

 

 

 


It gives me a success message but in SharePoint the record for that column is not picked up.

How should I write it correctly?

Categories:
  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    Hi @SpartaBI ,

    I am trying to work out the difference - you will always be selecting an item from the combo box and this will be the Update of the card. If you want different choices, put this in the Items.

    The two options you have are actually the same.

  • SpartaBI Profile Picture
    48 on at

    @WarrenBelz thanks for your reply.
    In case I go with the original combo box (so I won't need to edit the update property) so what should I write on the else branch for the items property?

    SpartaBI_0-1654762310895.png


    And what for the defaultselecteditems property?

    SpartaBI_1-1654762556276.png


    This is my collection:

    SpartaBI_2-1654762653414.png


    I also added these values to the choices in the SharePoint to the original Supplier column just to be on the safe side it will be able to pick up the values from the alternative demo supplier collection.

    This function doesn't return an error for the items:
    If(
    First([@PowerBIIntegration].Data).'Selected Showcase For Expenses App' = "Real",
    Choices([@Expenses].Supplier),
    DemoSuppliers.Supplier
    )

    However, it doesn't pick them up in case the else branch kicks in.

    Really appreciate your help, thank you for replying.

  • Verified answer
    WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    HI @Donzera ,

    I will start with some basics on the Items

    If(
     First(
     [@PowerBIIntegration].Data).'Selected Showcase For Expenses App’ = "Real",
    	 Choices([Expenses].Supplier),
    	 RenameColumns(
     DemoSuppliers.Supplier,
     "Supplier",
     "Value"
     )
     )
    )

    both options need to output the same "Value".

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • SpartaBI Profile Picture
    48 on at

    @WarrenBelz ok, checking, 1 min

  • SpartaBI Profile Picture
    48 on at

    ok, yes, now I see in the same combo box the items for the collection.
    How can I change the default? Currently it's still showing the default of the real supplier.
    I tried to edit the DefaultSelectedItems like this, but it give me an error function for the else branch

    SpartaBI_1-1654766903062.png

     

     


     

  • Verified answer
    WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    Hi @SpartaBI ,

    Try this

    {Value: ThisItem.Supplier.Value}

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • SpartaBI Profile Picture
    48 on at

    @WarrenBelz that works :)) but I needed to change it to:
    {Value: ThisItem.'Demo Supplier'}
    That make sense to you that my version also works?

    Your version worked because currently for fake suppliers the values are the same for both columns in the SharePoint list but I aim to remove those fake choices entirely from the real supplier column and add a logic that will add a real matching supplier to the real column based on the selected item when I'm in demo mode.

    So I will need in this case to use my version of the code right?

  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    @SpartaBI ,

    The main issue is that you are writing to a Table field (Choice field) which has one Text field called Value and you need to write a Text value into that, so if 'Demo Supplier' is Text, then yes that will work.

  • SpartaBI Profile Picture
    48 on at

    @WarrenBelz Demo Supplier is a calculated field that returns text, so same goes also for this case?

  • Verified answer
    WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    @SpartaBI ,

    Be careful with calculated fields - they are not the best friends of Power Apps and do not always refresh if their dependant values in the source is changed. If it works in your case, then keep using it, but it is better to do the calculation in Power Apps.

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
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard