Jump to content
  • 0

Use report form to search and save on another table


LuluSW

Question

Caspio minds

How can I use a report form to select an item from a table, and after the item is selected I save it as a foreign key on another table?

For example,  imagine two tables:  Users and Cars.   A user wants to buy a car.  So I use a report form to show the items from Cars table.  Once the user selects the car he wants, the app will save the CarId on the User table.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
4 hours ago, LuluSW said:

Caspio minds

How can I use a report form to select an item from a table, and after the item is selected I save it as a foreign key on another table?

For example,  imagine two tables:  Users and Cars.   A user wants to buy a car.  So I use a report form to show the items from Cars table.  Once the user selects the car he wants, the app will save the CarId on the User table.

You need to create a separate table for orders and pass parameters in query string to this table from report datapage.

Create a submission form and receive needed parameters onload: customerID and car_ID, insert autosubmit script, save the datapage and get the direct deploy URL of the datapage. Autosubmit script will let you submit data automatically.

Then place a link to the submission form in html block on report datapage. E.g:

<a href="URL_of_the_datapage&Customer_ID=[authfield:Customer_ID]&Car_ID=[@field:Car_ID]">Link name</a>

 

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