Jump to content
  • 0

Creating Many Records Based On List Selection


DaveS

Question

I have a scenario where I have a default list of products (substantial list that resides in a table of its own), and my customers will select which of those products they want to offer.  Ideally, I'd have them go to a list report or tabular report, select the ones they want to offer (with checkboxes) and then create records in the many-to-many associative table based on which items were selected.  

What I've considered:

  1. Creating all the dependent records automatically with a status field of "inactive".  Then using a view where the updated table is the associative table.  Then I could have a grid update page.  So far, this seems the best, but I hate creating all of those unnecessary records, and I've struggled to make the grid update look decent.
  2. Creating a list report with a custom button that links to a page where the user can add the association record.  What I dislike about this is if they want to pick 10 records they've got to go back and forth between page 1 and page 2 10 times.  
  3. The possibility of some custom sql that would create the association records, but I don't think we're able to insert.
  4. Passing some long string that concatenates customerID with each product ID and passing that to a data page that stores that somewhere and have a trigger or task that unwinds the concatenated field (this sounds super-sketchy).

Would welcome ideas - thanks all!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hello

You may also consider using a submission form with a custom multi-select listbox 

 and a hidden field that captures the user's current ID.

then on the table, make a setup like this: 

This will separate those long string of CSV into multiple records on your table.

Link to comment
Share on other sites

  • 0

Or another setup like this:

1) Create any report datapage that displays plenty of records in the results page (tabular,list, or gallery)

2) Create a submission form with that will capture the ID of the selected product from parameter and the ID of the current user. Use a script to make the form auto submit: 


3) Create a link on your report page that will open the submission form into a pop-up instead of redirection,https://howto.caspio.com/tech-tips-and-articles/how-to-generate-link-menus-and-popup-windows/

With this setup, they will just have to click the link and it will create a new record associated with them.
 

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