Jump to content
  • 0

Build A Submission Form (DataPage) That Writes to Separate Tables


bbeshlian
 Share

Question

Hello,

I want to build a Submission Form (DataPage) that submits data to two separate tables. The tables are built and a one to many relationship is set. I built the and tested two separate submission forms and they work as I want them to. The first submission form pulls the Employee Information from a separate source and is written to and Employee Information table. The second submission form pulls some data from the same source as the Employee Information, this is for the case if the Employee made a referral, and writes the data input to a Bonus Data table. I've watched a couple of the help videos on setting up the relationship and passing the parameters. My Employee ID field is the parameter in plan to pass since its unique in the Employee Information table and can appear multiple times in the Bonus Data table. I've done some experimenting and I see a View will allow me to update one table or the other but not both at the same time. This is where I am stuck. I've attached screen shot of the Table Design, Relationship and Datapages. Let me know if more information is needed.

Thanks,

Bill

Bonus_Data_Table.PNG

Bonus_Input.PNG

Employee_Info.PNG

Employee_Input.PNG

Relationships.PNG

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Kristina,

I can see how a triggered action will work. However, how would I set up the submission form to collect the data then input it into the respective tables? I thought a DataPage will only allow me to work with one object like a View or Table at a time unless I have a parent/child relationship set and pass a parameter common to both tables.

Thanks,

Bill

Link to comment
Share on other sites

  • 0

Hello Everyone,

Thanks for providing me with answers that got me to dig deeper into my question. Here is what I did. For the Employee Data Input when the Submit button is clicked you are sent to the Bonus Data input DataPage. Also while configuring the fields I selected on the Advanced tab to pass the Employee ID on exit. I attached screen shots.

Bill

Employee ID On Exit.PNG

Go To Add Bonus DataPage.PNG

Link to comment
Share on other sites

  • 0

Hi @bbeshlian

I've created a sample DataPages with the same workflow.

What I did is I added Virtual fields on my first submission form, to capture the Data that I will input to my second table on my second DataPage. And passed the value of these virtual fields as a parameter on exit. And set the  first DataPage to redirect to my second DataPage.

image.png.79323f3f7008144df757af3c91fa35f5.png

 

Then on my second DataPage, I've received the value of these virtual fields from my first submission DataPage. And assigned it to the respective fields on load.
image.png.cedd28d402dab85c0a3467678d5ff93d.png

After that, I've added an HTML block on use the code below to automatically submit our second submission form, once it successfully received the value from our first submission form

<script type="text/javascript">
  if(document.getElementById("caspioform")) {
  document.getElementById("caspioform").style.display = 'none';
  setTimeout('document.forms["caspioform"].submit()',1000); } 
</script>

image.thumb.png.81f923fdc3d5a361b19fe39ef6d2cbec.png

I've also attached the exported copy of the sample DataPages that I've created, so that you will see how it works.

I hope this helps.

Regards,

TsiBiRu

CaspioData_2019-Mar-07_2257.zip

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

×
×
  • Create New...