3 Replies Latest reply on Apr 20, 2014 2:37 PM by phanh

    Display multiple fields as groups

    phanh

      We have a database that track HW database. We need to modify it so our staff can input as much as 5 different pieces of hardware that will get recycled. The fields (CSD Label, Status, Description and Resson for Disposal) are to be grouped for a particular item. With the current layout, as soon as we change the first CSD label, the others will change as well. How can we design so each group will reflect different HW item?

      Note: when staff type in the CSD Label field, it will look up value in the HW table and populate the Status and Description fields.

       

      Thank you,

       

      Screen Shot 2014-04-19 at 8.06.04 PM.png

        • 1. Re: Display multiple fields as groups
          keywords

          Not a lot of information to go on her, but at a guess I'd say you have a form view layout with five sets of fields displayed. form view only displays one record at a time, so all the fields are actually referencing the same record. If I am right, you need to do one of:

           

          1.     If the hardware records you are referencing are from a related table/TO you could create a portal that displays five records from the related TO/table. (This option looks like possibly what you are doing, with the data below the line from the table the layout is based on and the repeated data above being from the related table, but not set up correctly.)

           

          OR

           

          2.     If you wish to display five records at a time from the current table, then you could create a list view layout and make your layout large enough to display at least five records.

          • 2. Re: Display multiple fields as groups
            erolst

            Hard to say why this happens because we can't see your schema, but you should use a table-based structure anyway:

             

            RecycleBatch --< RecycleItems >-- Items

             

            The tables you (probably) already have:

             

            RecycleBatch (the table you already have): _pk_recycleBatch, date, staff(_ID), notes; get rid of fields like CSDlabel1, CSDlabel2 etc. (i.e. everything that pertains to an item, instead of the batch as a whole).

            Items: …

             

            The join table you should add:

             

            RecycleItems: _pk_recycleItem, _fk_recycleBatch, _fk_item, reason

             

            On creation of a RecycleBatch record, have a script create 5 related records in RecycleItems, and in your layout, display them in a portal set to 5 rows.

            phanh wrote:

            Note: when staff type in the CSD Label field, it will look up value in the HW table and populate the Status and Description fields.

            Search for the item in the Items table (or use a popup/dropdown, or a picker dialog with typeahead), then use the item's primary key to populate the item foreign key in the join table; all the other data from Items can then simply be displayed, instead being copied (which I take it is what populate means).

            • 3. Re: Display multiple fields as groups
              phanh

              Thank you, keywords and erolst

               

              We currently have a hardware database that track hardware inventory. When a piece of HW get recycled, the users can search of it and then click on the Form button that will fill in the majority of information. The users then peal the HW label on the equipment and stick it on the form and send over to central office.

              Screen Shot 2014-04-20 at 2.14.17 PM.png

              We want to improve the process so when users select Recycled in the Status field, it will send the users to the Hardware Recycle layout where they can input as many as 5 different items at once. (The next feature is picture uploading so users can upload the pics rather than peal and send over the physical labels)

              Screen Shot 2014-04-19 at 8.06.04 PM.png

               

              All information is currently in the Hardware table. The TechRecycle table is new, without any data in it. CSD Label field in TechRecycle table is a value list that looks up info from the CSD Label in the Hardware table.

               

              Screen Shot 2014-04-20 at 2.12.46 PM.png Screen Shot 2014-04-20 at 2.34.07 PM.png