Skip to main content

Notifications

Power Apps - Building Power Apps
Suggested answer

Patch Multiple Choice with new Choices

(0) ShareShare
ReportReport
Posted on by 4
Hello together, 
 
I am looking for a solution that makes it possible to manually add new choices to a multiple choice column. In this column I want to save machine characteristics for every order. I need something like a "growing" dropdown, where i can re-use characteristics that are the same like in another order by selecting it and also add new characteristics that were not used in the past.
 
It should be possible to select two or more choices (that are already existing in my sharepoint list multiple choice column) AND add new choices. So for example one scenario could be that i want to patch into my multiple choice column in sharepoint list two existing choices from my dropdown and also two new choices that are not in my dropdown because they are "new".
 
Is there a way how i can face this problem?
 
Thanks in advance
Lukas

___________________________

  • ronaldwalcott Profile Picture
    ronaldwalcott 1,388 on at
    Patch Multiple Choice with new Choices
    Summary
    Reconsider your design of using a multiple choice column and consider if a parent child relationship will better address your needs.
    You will maintain a machine characteristics list containing something like characteristic and description and you can add to this list when necessary.
    I don't completely understand your business case so I will assume that these are custom orders where one specifies the characteristics associated with each order. You would have a new SharePoint list containing the machine characteristics of the ordered item in a parent child relationship, so each machine has several of these characteristics records chosen from the dropdown list of machine characteristics. 
     
     
    Detailed

    Review of Design Choices

    Multiple Choice Column Approach:

    • Pros:

      • Easy to set up and use.

      • Suitable for simple scenarios where a limited set of predefined options can cover all possible characteristics.

      • All data is stored in a single list, making it straightforward to manage.

    • Cons:

      • Limited flexibility: Difficult to add new characteristics without modifying the list structure.

      • Harder to manage relationships between characteristics and specific orders.

      • Potential for data redundancy and inconsistencies if multiple characteristics need to be associated with a single order.

    Parent-Child Relationship Approach:

    Concept:

    Create a main "Orders" list and a related "Machine Characteristics" list. Each machine in the "Orders" list will have multiple entries in the "Machine Characteristics" list, representing the various characteristics of the machine.

    • Pros:

      • Increased flexibility: Easier to add new characteristics without changing the overall structure.

      • More scalable: Suitable for complex scenarios with numerous and varied characteristics.

      • Better data integrity: Reduces redundancy by storing characteristics in a separate list.

      • Allows for more detailed queries and reporting on machine characteristics.

    • Cons:

      • Slightly more complex setup and maintenance.

      • Requires proper relational management to ensure consistency and integrity.

    Implementation Steps

    1. Machine Characteristics List:

      • Fields: Characteristic (Dropdown), Description (Text).

    2. Orders List:

      • Fields: Order ID, Customer Details, Date, etc.

    3. Relationship Management:

      • Use a lookup column in the Orders list to link to the Machine Characteristics list.

      • Ensure each order has multiple machine characteristics linked.

    Example Setup:

    1. Machine Characteristics List:

      • Characteristic: Engine Type, Color, Size, etc.

      • Description: V8, Red, Medium, etc.

    2. Orders List:

      • Order ID: 001

      • Customer: John Doe

      • Date: 2024-12-10

    3. Linked Machine Characteristics for Order ID 001:

      • Engine Type: V8

      • Color: Red

      • Size: Medium

    Conclusion

    Using a parent-child relationship offers greater flexibility and scalability, especially for custom orders with varied machine characteristics. This design ensures that characteristics can be easily added or modified without disrupting the overall system.

  • Suggested answer
    abc 123 Profile Picture
    abc 123 713 on at
    Patch Multiple Choice with new Choices
    Rather than using a Choice column, use a Lookup column. When a new value is needed, just patch it to the Parent list.
  • Suggested answer
    Pacel1 Profile Picture
    Pacel1 79 on at
    Patch Multiple Choice with new Choices
    Yes, it's possible :)

    First at all You have to setup column in SP, to accept multiple choice and alow adding new records.

    Next You have to patch record using this schema

    Patch(
    'Datasource',
    LookUp('Datasource', ID=XYZ),
    {
    ChoiceColumn: [
    {Value: "FirstValue"},   //Existing Value
    {Value: "SecondValue"},  //Existing Value
    {Value: "ThirdValue"}   //New Value
    ]
    }
    )

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

Kickstarter Events…

Register for Microsoft Kickstarter Events…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #13 Writing Effective Answers…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,858

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,505

Leaderboard