4 Replies Latest reply on Dec 22, 2011 9:27 AM by AndrewFoo

    Tabs and List View

    AndrewFoo

      Title

      Tabs and List View

      Post

      I'm trying to set up a database for queuing.

      Essentially there is a front desk that will be handling 4 main categories of customer service and I'm trying to create a simple "log in" for people to fill out and the backend will be able to keep track of what requests are out there.

      I have attached an image of what I currently have now (for the backend). There is only one table in the database since it is being used for a very simple task.

      Ideally I would like to have the backend use a tabbed approach based on the 4 categories combined with a scrollable view within each tab that only shows data that have the same "category/help needed with" field. I am hoping to show multiple records within each tab so it can provide a more accurate view of what is going on.

      Then I would like it to sort the data within each category by a "first come first serve" basis. Once the "task accepted" box has been checked it would send that record to the bottom. I have figured out the sorting part just not within a specific tab.

      Is there a way to do this?

      Thank you

      Help.jpg

        • 1. Re: Tabs and List View
          philmodjunk

          Tab controls are really intended for Form View not list view so you're going to need to make some changes:

          Option 1. Keep with a list or table view, but replace your tabs with buttons in the Header that perform finds and sort the found records to produce the scrollable lists that you want.

          Option 2. Set up a self join relationship with a cartesian join operator like this:

          YourTable::anyfield X YourTable2::anyfield

          You create YourTable2 by selecting YourTable in Manage | database | relationships and then clicking the duplicate button (two green plus signs).

          To get X in place of = in the relationship, you double click the relationship line to bring up a dialog box where you can make that change.

          Now you can put a filtered portal to YourTable2 on each tab panel. Specify a different filter expression on each so that you only see the records appropriate for each panel in the respective portals. You can also specify different sort orders for each portal if you need that.

          • 2. Re: Tabs and List View
            AndrewFoo

            Hi Phil,

            I went with option 1, it worked beautifully. Thank you!

            I do have a couple follow up questions.

            1. Calculation (countif related)

            I have a function that works for counting the amount of people that have not been helped yet. In this case it is anyone without a "task accepted" box checked.

            Unforunately this doesn't work when data is constrained via a find function.

            Is there a way to do this when I have a constrained set of data (divided by their category of help needed)

            2. Is there a way to change labels on a table using a script?

            For instance, If the "help needed" section is for "jobs" is there a way to set a field in the header to "Total waiting for jobs". The label would go just before the "number of people waiting" field

             

            Thanks!

             

            • 3. Re: Tabs and List View
              philmodjunk

              1) You can use a relationship that matches only to people that don't have this box checked or a filtered portal to count all records in your table with this field empty.

              Here's the filtered portal approach:

              Define a summary field that counts all records in your database by "counting" a field that is never empty. You may have such a summary field already.

              Open Manage | Databse | Relationships and make a self join like I described in my first post for Option 2.

              Put a one row portal to this self join's "table occurrence" on your layout and put the summary field (also from the same table occurrence as the portal) inside the portal row.

              Define a portal filter with this expression: IsEmpty ( YourTable2::Task accepted ) to filter out all records except those without a value in this field.

              2) There are several ways you can do this. Here are two you can play with:

              a) Define a text field with global storage in your table. Put it in your header as your "label" use set field to change the text in this field as needed when the user clicks a button to run one of your scripts.

              b) Put this layout text in your header: <<$$FieldLabel>>
              In your script, use:
              Set variable [$$FieldLabel ; value: "Total Waiting for jobs" ]
              Refresh Window

              • 4. Re: Tabs and List View
                AndrewFoo

                Thanks!

                I'll try it all out