Jump to content
  • 0

Multi-table web form


NELSON

Question

3 answers to this question

Recommended Posts

  • 0

The main two tables are TendersProject and PjStats_1 and the rest are lookup tables.  We assume you already have data in your lookup tables.  Therefore, two submission pages are required for each main table. 

First for all the connections between lookups and TendersProject check to have a display value on DataPages as explained here:  https://howto.caspio.com/tables-and-views/relationships/relationship-settings/.

When you create a submission page based on TendersProject, then the system will recognize the relationship display value and by default will choose dropdown as form element to show the display option you selected in the relationship and save the ID.

You can either right after creating a TendersProject, redirect the user to the second page which is a submission page based on PjStats_1 that is receiving the TP_IP as an external parameter int his format [@InserRecordTP_IP] or add all TendersProject and then create a report page based on this table and in result page add an HTML Block to create a hyperlink to the submission page which is based on  PjStats_1 table. You need to pass the TP_IP value through the link. For instance:

<a href="link of second submission page?TP_IP=[@field:TP_IP]"> Create Pj Stat</a>

In this case, in the second submission form, you need to receive the parameter in this format [@TP_IP] as this is the name of the parameter in the hyperlink.

Link to comment
Share on other sites

  • 0
4 hours ago, MayMusic said:

The main two tables are TendersProject and PjStats_1 and the rest are lookup tables.  We assume you already have data in your lookup tables.  Therefore, two submission pages are required for each main table. 

First for all the connections between lookups and TendersProject check to have a display value on DataPages as explained here:  https://howto.caspio.com/tables-and-views/relationships/relationship-settings/.

When you create a submission page based on TendersProject, then the system will recognize the relationship display value and by default will choose dropdown as form element to show the display option you selected in the relationship and save the ID.

You can either right after creating a TendersProject, redirect the user to the second page which is a submission page based on PjStats_1 that is receiving the TP_IP as an external parameter int his format [@InserRecordTP_IP] or add all TendersProject and then create a report page based on this table and in result page add an HTML Block to create a hyperlink to the submission page which is based on  PjStats_1 table. You need to pass the TP_IP value through the link. For instance:

<a href="link of second submission page?TP_IP=[@field:TP_IP]"> Create Pj Stat</a>

In this case, in the second submission form, you need to receive the parameter in this format [@TP_IP] as this is the name of the parameter in the hyperlink.

Thanks for the prompt reply.

First for all the connections between lookups and TendersProject check to have a display value on DataPages  <- Done.

The system will recognize the relationship display value and by default will choose dropdown as form element to show the display option you selected  <- Right.

I have a couple of situations:

  • I pass the external paramenter TP_ID to the second Submission page (based on PjStats_1) but this second Submissión form does not allow me to add records to PjStats_1, when, for example, no records in PjStats_1 exists associated to the TP_ID passed. Adding records is required. 
  • I managed to add records to PjStats_1 using the Tabular report datapage instead of a Submission form datapage. This tabular report recieves the TP_ID and displays the associated records in PjStats_1 and if no record is found allows to add a new one. However, Tabular reports don´t allow to arrrange fields and there are so many fields in the PjStats_1 table that it is uncomfortable. 
  • It is not clear to me how to 'add an HTML Block to create a hyperlink' using a report page. Would this way allow me to add records?

In summary, I need to enable the user to add records to PjStats_1 table, associated to a particular TP_ID, when no record exists and at the same time exploits the versatility or the submissión forms in as far as text field arrangements and presentation are regarded.

thanks

Link to comment
Share on other sites

  • 0

If you create a submission page based on " PjStats_1 " you should be able to receive TP_IP and add new record to this table with the same TP_ IP.  Since it is a submission page you should never get no records found.

Please note, whenever you check a checkbox on a submission page to pass the unique value to the next page after submission, in the next page to receive that auto-generated value you need to add "InsertRecord" to the name of the field to receive that value.  For instance let's say TP_IP is an autonumber and you checked to pass this unique value after submission, in the receiver page you need to use this syntax: [@InsertRecordTP_IP]

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...