web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to add new record ...
Power Apps
Unanswered

How to add new record when 2 items are selected on submission of record

(0) ShareShare
ReportReport
Posted on by 11
Hey all,

I have a scenario where i have an app where my user base submits leads for instrument products within my company. They have the ability to select multiple products as each product is set up as it's own individual field within my common data service entity. The problem actually comes in when they select multiple products as it will only submit one row into my database.

Does anyone know if there is a way to basically 'Split' the one submission into 2 rows? I've looked at a few options via Microsoft Flow but haven't had much luck so far.

Any help suggestions are more than welcome.

Thanks all.

Jamie
 
 
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @stephej,

    it appears that you have a one to many relationship between leads and products. You need to have two tables. Please see my posts in the community blog for how to design your tables.

    I recently posted in the creating apps forum on a thread titled

    • “Add values in a one to many connection”
  • v-xida-msft Profile Picture
    on at

    Hi @stephej,

    Could you please share a screenshot about your app's configuration?

    How do your users select multiple products within your app? How does your app submit the selected product?

    Do you use a Gallery to list all product records of your CDS Entity within your app?

    If you want to submit multiple records (product records) into your CDS Entity, I think the ForAll function and Patch function could achieve your needs.

    Please check and see if the following thread would help in your scenario:

    https://powerusers.microsoft.com/t5/General-Discussion/How-to-bulk-update-with-ForAll-or-Patch/td-p/9330

    More details about Patch and ForAll function in PowerApps, please check the following article:

    Patch function

    ForAll function

     

    Best regards,

    Kris

  • stephej Profile Picture
    11 on at

    Thanks for your help @v-xida-msft

     

    To explain a little further:

     

    - All my data is contained within one entity which is called Lead Generation Details

    - Each of my product's are their own field. Each field has a field type of Boolean and displayed like shown below with my user input form:

     

    Product field type.jpg

     

     

    - When my user base is selecting an instrument (currently) will select which instrument they want to submit a lead on (see below). They can select as many instruments as they would like to just to add

    Instrument Selection.jpg

     

    - The good news is i already use the patch function (due to having 4 pages of input fields within one entity) though the bad part is when one of my users submits say more than 1 instrument within the one submission, it will come through as one record (as shown below)

    Record_One_Line.jpg

     

    What would be great to understand is there a way of automatically adding another record is more than 1 instrument is picked? Or do you have any other suggestions on maybe ways to approach this design?

     

    Thanks again @v-xida-msft

     

    Jamie

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard