Jump to content

Add new record from Tab Report


Recommended Posts

Can someone help me with a JS that will add a record with parameters to a table by clicking on a row of a tabular report? Would also work if it was a link added to each row.

I'm trying to allow users to quickly create a list of favorites from a large database of docs.

Details:

Click on tab report row (or link) generated from "Docs" table > add new record to "Favorites" table  setting Favorites.DocID to Docs.DocID AND @UserID to Favorites.UserID

 Thank you!!

marc

 

Link to comment
Share on other sites

1.       Create a favorite table  that includes these fields: Doc_ID, User_ID, DateAdded (Timestamp)

2.       Authentication this page

3.       Check to receive Doc_ID as a parameter

4.       Receive User_ID from Authentication

5.       Add an HTML Block to the end of element list and use this code to auto submit this page https://forums.caspio.com/topic/4314-js-auto-submit-a-datapage/

 

6.       In the report DataPage, add an HTML Block and Type in "Add"

7.       Highlight the test and click on hyperlink icon, paste the URL to this submission page and at the end add "?Doc_ID=[@field:Doc_ID]"

8.       Click on Target tab and select popup window.

This way by clicking on this link a popup page will open and add the record of the Doc to this table. If you create a report based on Favorite table and enable RLS on User_ID, each user can see the list of items they have added

 

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
Reply to this topic...

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