Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Add another choice to an existing list of choices - Dataverse Choice Column

Posted on 24 Nov 2024 14:36:56 by 617
I had assumed I could create the typical classic gallery in my Canvas Power App and display the option set (done), then I assumed I could add a button for New Option and have a text input field to add a new value to my list of option choices... I'm stuck on the patch statement ...

I'm trying to create the UI where the team users can add to the choices. I realize I can go into DV and manually add another option.
Patch(OptionsRoomOccupancy,Defaults(OptionsRoomOccupancy),{

 /* how to patch */


})
Categories:
  • ronaldwalcott Profile Picture
    ronaldwalcott 855 on 24 Nov 2024 at 17:16:41
    Add another choice to an existing list of choices - Dataverse Choice Column
    You should make a practice of only using Choice for fixed items where they are predetermined options being part of your business rules.
     

    Example Use Cases:

    • Yes/No Fields: Simple binary choices, such as confirming whether a task is completed.

    • Status Fields: Tracking the progress of tasks or projects with statuses like New, Open, In Progress, and Closed.

    • Category Fields: Categorizing data into predefined groups such as High, Medium, and Low priority.

  • timl Profile Picture
    timl 31,946 on 24 Nov 2024 at 16:00:42
    Add another choice to an existing list of choices - Dataverse Choice Column
    Hi sasrsc 
     
    It's not possible to create a new Dataverse choice item from formula, or by calling Patch.

    I'd suggest that you add related table and lookup instead, which would give more flexibility (eg, in the related table, you can 'soft delete' items/mark items as inactive, more easily  change the description of existing choice items).

    If you actually do want to create a new choice item from Power Apps, you can do so by calling a Flow, as described here.

    https://www.powercommunity.com/create-new-dataverse-choices-option-sets-from-canvas-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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard