Selecting multiple items from a table- best way to do it?

Hi there,
Working on a project management system.
I have:

  • a table “people” (person_id/name/city/password/email).
  • a table “projects” (proj_id/proj_name/proj_description)
  • a table “project_access” (proj_id/person_id/access_type)

I want to make an interface so that, if you’re working on a project, you can select many people from the “people” table and add them to the project_access table for the project you’re working on.

NOTES:

  • The “people” table has over 10,000 entries, and often you need to add 1000 of them to the project!
  • So, it needs to be really fast for the user (like one click or a checkbox) to add someone, since they’ll need to do it 1000 times!
  • Also, if they could filter by city, and select all people in a city, that would be great, but how?

I’m new to ScriptCase, so any help would be great!

I found a way. There’s 2 good ways I see:

  1. Double Select. Not sure if this is good for huge databases. Look it up in web help.
  2. What I used… I made a grid and added a PHP button “Add all to Project”. Then you can use the Macro “sc_where_current”. You can also add a link with an Ajax event for OnClick to add individual entries. Not sure if this is the best, but it’s all I could figure out at this time.

Also, I found an example for selecting multiple records with a checkbox…

See:
Run Button in a Grid Application (Processing Records) Run l Tutorial 6624 views
Under the Samples section of the scriptCase website.

There are several ways as you discovered already. The best approach depends on your need. Double select works well, but you need to take care of the way the data is stored. It’s not convenient if you have a large dataset to select from. Goes for any construction. In that case I would recommend to make a modal form to select from, and refresh your main form afterwards. In the modal form you can apply searches etc.

Hi, aducom:
Could you please tell me how can I finish the multiple items select as you say?
Thank you very much.

There are several options, which one are you refering to?

you can get online guidance for queries .