Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #2
    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.

    Comment


    • #3
      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.

      Comment


      • #4
        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.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


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

          Comment


          • #6
            There are several options, which one are you refering to?
            Albert Drent
            aducom software netherlands
            scriptcase partner, reseller, support and (turn-key) development
            www.scriptcase.eu / www.scriptcase.nl

            Comment


            • #7
              you can get online guidance for queries .

              Comment

              Working...
              X