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 / How to create and add ...
Power Apps
Unanswered

How to create and add multiple forms and save each form to the same customer record in the Dataverse

(0) ShareShare
ReportReport
Posted on by 71

I am creating a Canvas application for a car and bus leasing solution.

 

I have a basic form and want to add multiple Bus and Car forms for each client and save it as each client may lease multiple cars and buses. So I want to capture details for each car and bus leased to a client and save details.


Example:

User will fill up the form for the new customer with basic details and ask the customer for the total number of cars and buses the customer will lease.

 

Customer A may lease 3 cars and 2 buses.  

Customer  B may lease 5 cars and no buses.

 

       For Customer A: 

  • When a user clicks on the CAR icon after filling the basic details form, a new car details form with 10 pre-decided control fields will be visible below the basic form for the user to fill up car details and save it.
  • When a user clicks on the Bus icon on the basic details form, a new Bus details form with 5 pre decided control fields will be visible below the basic form (or below the car form if the user has already filled in the car form) for the user to fill up bus details and save it.
  • Every time a user clicks on the Car or Bus icon one new Car or Bus form should be added respectively below the basic form details.
  • Each car and Bus form should be saved separately and should be linked to the specific customer who is leasing the Bus and/or Car.

 

(Example: Customer A saved details will include basic form details and 3 cars forms details and 2 bus forms details. AND Customer B saved details will include basic form details and 5 bus forms details.)

 

Attaching screenshots of screen design and database table concept diagram to this request.


I am using Canvas and Dataverse. 

 

I designed a form with basic form control fields and car form control fields and kept car form control fields hidden until the user pressed the car button. 

I am able to save the form however I am unable to add multiple car and bus forms and save it to the same customer record.

 

Any help or guidance or ideas on how to go about this scenario will be appreciated.



Leasing-1.png
Leasing-2.png
Categories:
I have the same question (0)
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    To create and add multiple forms for each car and bus leased to a customer in your Canvas app and save them to the same customer record in Dataverse, you can follow these steps:

    1. Set up your Data Model:
    - In Dataverse, create two additional tables: one for cars and one for buses.
    - Each table should have columns to store the relevant details for cars and buses respectively.
    - Establish a relationship between the customer table and the car/buses tables using a lookup field, so each car/buses record is linked to a specific customer.

    2. Designing the App:
    - Create a screen for the basic customer details form.
    - Add input controls for the basic customer details and a button to save the details.
    - Create separate screens for the car form and the bus form.
    - On the basic customer details screen, place icons or buttons for adding cars and buses.
    - When the car icon/button is clicked, navigate to the car form screen, and when the bus icon/button is clicked, navigate to the bus form screen.
    - On the car and bus form screens, add the necessary input controls for car and bus details, along with a save button.

    3. Saving the Data:
    - When the user fills in the basic customer details and clicks the save button, create a new customer record in the Dataverse customer table.
    - Retrieve the newly created customer record's unique identifier (GUID) and store it in a variable.
    - When the user fills in the car details and clicks the save button on the car form screen, create a new record in the Dataverse cars table.
    - Set the lookup field in the cars table to the unique identifier of the corresponding customer record.
    - Repeat the same process for saving bus details to the buses table, linking it to the customer record using the lookup field.

    4. Displaying the Data:
    - To display the saved data for each customer, you can use galleries or other controls on a separate screen.
    - Retrieve the cars and buses records linked to a specific customer by filtering the cars and buses tables based on the customer's unique identifier.
    - Display the relevant car and bus details using the galleries or controls, based on the retrieved records.

    By following these steps, you can create multiple car and bus forms, link them to the specific customer record, and save them separately in the Dataverse. This allows you to capture details for each car and bus leased to a customer and associate them with the correct customer record.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard