6 Replies Latest reply on Dec 1, 2015 2:35 PM by azdoc

    Flag portal activity


      I have a layout with a portal that displays information determined by filtered relationship triggered by a set of buttons.

      I would like the layout to display information about the contents of the portal so that users will know which buttons to activate.


      As an example (to make it easier to explain), I have a table of all the tasks to be performed by staff on a project.   This task table is related to the project table by match field.


      There are five categories of tasks:  Cat 1, Cat 2, Cate3....etc.


      The "boss" designates tasks for each category using a variable pick list using a conditional value list that displays based on the parameters of buttons labeled "Cat 1, Cat 2..etc).  However, not all categories will have tasks defined.  So, for example, Cat 2 and 3 may be empty, while 1,4, and 5 have 4-5 tasks listed.


      On the employee project layout, there is one portal with five buttons labeled Cat 1-5 at the top.  When the "Cat 1" button is activated, the portal displays the list of tasks to be completed in that category.   A button in the portal row of a task will remove the task from the list, mark when completed, and set to a separate portal that displays completed tasks.


      Since not all categories have tasks to complete, and the portal will only show information under one category of tasks, I am looking for a way to vary the display of those buttons associated with assigned tasks  from those that are not.  Preferable with a different color or icon.


      I am using the filtered relationship because of performance issues with filtered portals


      Any help would be appreciated.

        • 1. Re: Flag portal activity

          So...clicking the Category 1 button sets a global to Category 1, and that establishes a relationship to Category 1 tasks in the Tasks table? Something like that? And if an employee has tasks for Categories 1, 3, 5, you want buttons 1, 3, 5 to look available and buttons 2, 4 to be grayed out (or something like that)?

          • 2. Re: Flag portal activity

            Yes.   Otherwise you would have to click every button to see if there were any tasks in that category to complete.  Not a huge problem but an opportunity for things to get missed.

            • 3. Re: Flag portal activity



              Depending on what you're using for buttons, you could conditionally format them based upon an ExecuteSQL formula, or you could hide them as needed.


              Using Conditional Formatting on each button, your ExecuteSQL might look something like:


              ExecuteSQL ( "select COUNT(T.TaskID) from Tasks T  where T.Category = ? AND T.kf_SerialNumber = ?"; ""; ""; 1 ; EmployeeProjects::kP_SerialNumber )


              You'd modify the part near the end, changing "1" to "2", etc., so you'd have 5 similar statements.

              • 4. Re: Flag portal activity

                Becoming more familiar with SQL has been on my do to list for a while so it looks like now might be a good time.  I will give it a shot.  Thanks.

                • 5. Re: Flag portal activity

                  If you copy and paste my formula, and modify it so your tables and categories replace what I put in, it ought to work. Just replace my table names with yours and so on.


                  Also, name each button. At then end of your script which sets the global, issue a commit, then a Refresh Object for that button. Otherwise the ExecuteSQL may not re-evaluate on its own.

                  • 6. Re: Flag portal activity

                    Ok, Thanks!

                    I'll give it a try