10 Replies Latest reply on Feb 15, 2016 2:12 PM by wendy

    How to highlight a button when a work queue contains records

    wendy

      Hello all. We have work queues, but also have users forgetting to check a certain queue, and/or users forgetting to alert coworkers that something has been added to a work queue. I hope I just need someone to start me off in the right direction--or tell me if this isn't possible.

       

      Currently:

      - We have records in our database that contain information about artwork being done.

      - A User#1 can ask a coworker (User#2) to inspect (proofread) their artwork. User#1 makes this request by changing a Status text box field to Inspect, and entering User#2's name in an Inspector text box field. (Choosing from drop-down lists.)

      - On each of four key layouts, we have an INSPECT button any User (User#2) can click to see if there is work waiting for them (to inspect). The button goes to a "Find My Inspection Work" script.

      • This script merely uses a restored Find to find records with the Status of Inspect. It then inserts the Current User Name (User#2) into the Inspector field, and performs the Find. (Unfortunately, at this time we don't have individual logins, but we do have each user's name in Filemaker/Preferences/User Name.)

      - If records are found, it simply changes User#2's found set. If no records are found, a "No art to inspect" message pops up. (Unfortunately, it then loses the existing found set; I want to fix that also sooner or later., but it's not as crucial.)

      - Right now, User#1 is supposed to email #2 that #2 needs to inspect something. Either #1 forgets, or #2 doesn't check their email soon enough, or #2 reads the email and then forgets. And #1 forgets that they have work-in-process in someone's Inspect queue. Etc. The Inspect task is usually intermittent, so users don't check that queue unless alerted.

       

      Hoping for:

      Is there a way to have the INSPECT button change color (e.g. bright red) for User#2 when User#1 changes a record status to Inspect and inserts User#2's name into the Inspector field?

      - Ideal would be that the button "light" turns on for User#2 without any action on his part, but I don't know if this is even doable.

      - Acceptable would be having the "light" turn on when User#2 moves to the layout with the button, or changes his found set, or does any other such action.  (I'd also wondered if I could have the button invisible for #2 unless there is work, but that might have additional complications.)

       

      Can someone provide initial direction?

       

      We're using Filemaker 13.0v4. We have Filemaker Server with about 30 users on both Mac and PC platforms. No mobile. I do OK with calculations, but am weaker on understanding how to use relationships. Haven't worked at all with things like object visibility. Tried simple conditional formatting.

       

      Thanks in advance to the gurus out there. Hope to get closer to being one...

        • 1. Re: How to highlight a button when a work queue contains records
          erolst

          wendy wrote:

          I do OK with calculations, but am weaker on understanding how to use relationships.

           

          Well, that stuff works hand in hand – and you can save lots of unnecessary actions with the right calculations.

           

          If I understand your description, you could – from the context of your four key layouts – use this calculation:

           

          not isEmpty (

            FilterValues (

              Get ( Username ) ;

              List ( Artworks::inspector )

            )

          )


          to determine if there is an artwork record that is assigned to the current user – and you could use that in Conditional Formatting.


          (That assumes that the inspector field will be cleared once the status has been reset from “Inspection”.)


          A more streamlined approach may be to use an InspectingQueue table; if user#1 wants to ask user#2 to proofread/inspect a give artwork, she/he creates a new record in that table, with attributes like userNameRequest (auto-enter), userNameAssignment (select), artworkID, timestamp, status; since this could be scripted, you could automatically have a mail sent at the same time.


          This would also give you an “Inspection history”, if you have use for this information.

          • 2. Re: How to highlight a button when a work queue contains records
            wendy

            Hi erolst and thank you... I finally got a chance to implement, and this worked to highlight the button correctly, and I was even able to add another filter for the status, since we do not clear the field after inspection is done! Cool. However...

             

            User#2 only sees the formatting change (button turns red) IF they are on the actual record for the job the/she is supposed to proof. If User#2 is on one of the other 6000 records in our main database file, they still don't know there is an inspection job for them.

             

            Is there any way to have this button light up no matter which record #2 is on?  I thought perhaps there was a way to do this via a relationship, but I can't visualize how.

             

            I like the idea of an inspecting table and the email, but this is a legacy database, and I have a long "wish list" of improvements I'd like to do. But I'm unfortunately given limited time to do actual programming work and this was an "if you can do it 'quickly' " request.

            • 3. Re: How to highlight a button when a work queue contains records
              erolst

              wendy wrote:

              However...

               

              User#2 only sees the formatting change (button turns red) IF they are on the actual record for the job the/she is supposed to proof. If User#2 is on one of the other 6000 records in our main database file, they still don't know there is an inspection job for them.

               

              Is there any way to have this button light up no matter which record #2 is on?  I thought perhaps there was a way to do this via a relationship, but I can't visualize how.

               

               

              Well, I think you could either have a Staff table, or lacking that, a context were the user can select their Staff name (or have it entered automatically); either way, use that context to create a relationship into the main table by name, then employ the same strategy as outlined above

               

              Another strategy would be to simply perform a search by name and status.

              • 4. Re: How to highlight a button when a work queue contains records
                wendy

                erolst, performing a search defeats the purpose; the problem I'm trying to solve is user#2 forgetting to check his/her queues, and/or user#1 forgetting to inform user#2 via email that they have a job in their inspection queue, etc. So I'm trying to create something to catch the attention of user#2 as they're working,

                 

                It sounds like creating a relationship--and another table?--is the only way.

                • 5. Re: How to highlight a button when a work queue contains records
                  erolst

                  wendy wrote:

                  erolst, performing a search defeats the purpose

                   

                  Right; forgive me for losing focus.

                   

                  wendy wrote:

                  It sounds like creating a relationship--and another table?--is the only way.

                   

                  Yes, to generate a static display, use a relationship. (ExecuteSQL() may be another option, but that can be a show stopper in certain scenarios, and there is another learning curve to consider.)

                   

                  You could also make this transactional, i.e. change one staffer's status whenever something is put into the queue for them, or when the last unresolved item has been resolved (since you're only interested in yes or no).


                  This would allow you to store the value the display is based on, rather then having to re-evaluate this condition time and again in an unstored calculation.

                  • 6. Re: How to highlight a button when a work queue contains records
                    wendy

                    erolst, thank you for your help.

                     

                    I'll have to think on how to use a relationship for this.

                     

                    I'm not sure what you meant by "make this transactional, i.e. change one staffer's status..." There is no staffer status, just job record status.


                    I'm sorry, I don't think I explained our database as clearly as I could have! Basically:

                     

                    - All users are in database file viewing or working on different job records.

                    - User#1 temporarily sets the status on a record to Art, and permanently sets the Inspector field to User#2's name.

                    - User#2 needs to be alerted/reminded without periodically clicking on a "inspect queue" button on whatever record THEY happen to be working on.

                    - When User#2 is done inspecting, they set the job record(s) status back to Art. Their alert should disappear.

                     

                    It's a database I inherited, and I do know it needs restructuring to become more ideally relational, and I know there would be easier ways to do what I'm describing if it was!!

                     

                    Thanks for your patience and efforts.

                    • 7. Re: How to highlight a button when a work queue contains records
                      erolst

                      wendy wrote:

                      - All users are in database file viewing or working on different job records.

                      - User#1 temporarily sets the status on a record to Art, and permanently sets the Inspector field to User#2's name.

                      - User#2 needs to be alerted/reminded without periodically clicking on a "inspect queue" button on whatever record THEY happen to be working on.

                      - When User#2 is done inspecting, they set the job record(s) status back to Art. Their alert should disappear.

                       

                      Right, and you can do that with a button and Conditonal Formatting, or a text object and Hide, or even an unstored calculation field – but always by using an unstored calculation that involves the current user name, and consequently must be re-evaluated all the time.

                       

                      My alternative was to create a place where you can store a user-specific value (basically, “queue is empty or it isn't”); that value would be updated whenever something happens that could (potentially) change that value (this is the “transactional” approach).

                       

                      Since you don't have a User table and won't introduce one, that option doesn't apply.

                       

                      So since your users are always working in Job records, you could add a global calculation field as Get ( UserName ), create a self-join

                       

                      Job::gcUsername = Job_byUser::Inspector

                       

                      and use

                       

                      ValueCount ( FilterValues ( "Art" ; List ( Job_byUser::status ) ) )

                       

                      If that is True, there is at least one Job that awaits inspection by the current user.

                      • 8. Re: How to highlight a button when a work queue contains records
                        wendy

                        erolst, that is a very helpful explanation; thanks for the time you took to spell that all out, including the re-evaluation issue.

                         

                        I'll work with the option with the global calc field (thanks again for the details), but I will also experiment with your "transactional" approach. It could be repeatedly useful for us--and having a User table has been on my wish list for a long time.

                        • 9. Re: How to highlight a button when a work queue contains records
                          wendy

                          If anyone is keeping an eye on this discussion, I haven't had time to work further with this yet. If I get to a solution, I'll post back.

                          • 10. Re: How to highlight a button when a work queue contains records
                            wendy

                            Just had to stop back and note that this is working beautifully. Using the self-join and formula provided by erolst.