Jump to content
  • 0

List of records from one line multi data field


Steita

Question

Hi to everybody.

I have a problem. I need a table, and relative DataPage insert data than can insert data of more than one customer.

In just one data Page i need to accept customer1 and customer2 data (name, surname, address, email, phone ecc)

Now the problem is that i need to have the 2 customers, NOT in a table with unic horizontal line, but listed, with new id but with the same booking number, for a new record in the table.

I think i need a new table but i can't be able to make triggers to copy data in a new table and records automatically (if that is the right way). 

 

(Ex. of the table/dataPage i have)  ID_ booking  | booking_number  | n_of_ customer |  Customer1_name  | customer1_surname | customer2_name | customer2_surname|

                                                                                  1                             56789                               2                                      John                                     Doe                                     Mary                                 Harris

                                                                                  2                             56790                               1                                    Micheal                                Lewis

                                                                                 3                              56791                               2                                      David                                    Clarke                                Rose                                   Smith

 

(ex. of what i need)                                        1                            56789                               2                                       John                                     Doe

                                                                                 2                             56789                                                                        Mary                                    Harris

                                                                                 3                             56790                               1                                     Micheal                                Lewis

                                                                                 4                             56791                               2                                      David                                   Clarke          

                                                                                 5                             56791                                                                        Rose                                      Smith          

 

How can i do? 

Thank you for your time in advance.

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi,

It seems this is a one to many relationship case.

You should have two tables, Bookings and Customers.

From the tables perspective, you must create the booking first and the associate as many customers as you may need to one specific booking (please let me know if this is the intended behavior).

So, you can use a submission form to create the new booking and then redirect the user to a tabular page that handles the booking customers but pass the newly created booking ID as a parameter.

Check this article about how to deal with parameters https://howto.caspio.com/parameters/

In the tabular form based in the customers table, you use the Add records in top option in the page results section.

This should have a hidden field that would receive the booking ID. This way you can associate as many customers as you need to the booking.

Hope it helps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...