9 Replies Latest reply on Jan 20, 2012 2:30 AM by express

    I have a contact action section and I want to go to today's actions

    express

      We have a section on a contact form where the administrator will enter a date when the person should be contacted, they then enter the contacted actions needed in the next field.

      The administrators want to look at the Layout which lists the contact actions and start work

      However a number of the administrators are taking over from people who have left and so they have a number of contact actions which are over a month old.

      Basically when they go to the list of contact actions they want the list to be viewed from the days date.

      They still want to be able to see the days after and before today but they just want to start at today.

       

      Anyone know what to do?

        • 1. Re: I have a contact action section and I want to go to today's actions
          Mike_Mitchell

          Assuming I understand the question correctly, perhaps you can write a script that does something like this:

           

          Show All Records

          Sort Records [ Date Due ; Ascending ]

          Go to Record / Request / Page [ First ]

          Loop

            Exit Loop If [ Date Due >= Get ( CurrentDate ) ]

            Go to Record / Request / Page [ Next ; Exit after last ]

          End Loop

           

          This will present all records, starting with the oldest first. It then moves down the list, stopping when it gets to the first record that is on or after the current date.

           

          Close to what you need?

           

          Mike

          • 2. Re: I have a contact action section and I want to go to today's actions
            express

            Hi Mike,

             

            This sounds very good. Just have to try it.

            • 3. Re: I have a contact action section and I want to go to today's actions
              express

              Hi Mike,

               

              Thanks for the help but it still goes back to the earliest dated record.

              Any other ideas?

              PS I can't have a Show All Records line in the script as Administrators can only view records assigned to them.

              • 4. Re: I have a contact action section and I want to go to today's actions
                psijmons

                You have at least 2 options here,

                1   in the Manage Security > priviliges settings, set the priviliges for records to Customize... and set this to Limited...

                then in the calculation, limit this to records created only by the user (provided that all records have a creator field that names the user)

                 

                2   In Custom Menus, replace the Select All action with a script to show only records created by the user when the tableName is the one you want to restrict. Note that for the other tables, it should have the expected behaviour Show All..

                • 5. Re: I have a contact action section and I want to go to today's actions
                  BruceHerbach

                  Going back to Moke's suggestion,  Instead of show all do a find based on the field that determines records "Assingned.

                   

                  If you after the loop runs,  you are on the wrong record,  try reversing the sort order of change the exit condition of the loop to be

                   

                  Exit Loop If [ Date Due = Get ( CurrentDate ) ]

                   

                  This should kick you out when the loop hits the first record that meets today's date.

                   

                  One last thing,  since you are working on a list view,  you may still be seeing the first record even though the selected record is off screen. Add the command:

                      Scroll Window [To Selection]

                  after the loop.

                   

                  Bruce Herbach

                  1 of 1 people found this helpful
                  • 6. Re: I have a contact action section and I want to go to today's actions
                    RayCologon

                    express wrote:

                    They still want to be able to see the days after and before today but they just want to start at today.

                     

                    Anyone know what to do?

                     

                    Hi express,

                     

                    For the situation you describe, I'd suggest you consider providing a portal that shows a filtered view (filtered by administrator and action status) of the contact actions that require attention, sorted in order of the action due date, with highlight indicators (eg using conditional formatting) to indicate whether they are past due, due today or not yet due, and with filter options to show or hide each due-date category.

                     

                    With that approach, the portal will always show only those actions requiring attention and assigned to the currently logged-in administrator, will provide easy identification of the status of each listed action, and will provide administrators with the control they need to quickly view or isolate current or past due actions.

                     

                    Regards,

                    Ray

                    ------------------------------------------------

                    R J Cologon, Ph.D.

                    FileMaker Certified Developer

                    Author, FileMaker Pro 10 Bible

                    NightWing Enterprises, Melbourne, Australia

                    http://www.nightwingenterprises.com

                    ------------------------------------------------

                    1 of 1 people found this helpful
                    • 7. Re: I have a contact action section and I want to go to today's actions
                      Mike_Mitchell

                      express -

                       

                      If you perform this script without doing some sort of Find, then you'll simply get the found set of records - whatever they are. Hence, your results will be unpredictable, since the found set will be whatever the user has come up with. That would be Bad.

                       

                      You can do a couple of things:

                       

                      1) Replace the Show All Records with Perform Find [ User Name = Get ( AccountName ) ] or whatever Find request returns the appropriate found set for that particular user.

                      2) Do as Ray suggests and use a filtered portal instead. More elegant (and prevents the ugly <no access> identifier from popping up if the user does his own Show All). You can stop that by doing as psijmons suggests and replace Show All Records in the menu with a script that instead finds all that user's records.

                      3) You can still use a list view, if you like, by taking advantage of FileMaker's auto-sorting behavior and script triggers to mimic the filtered portal. That is, whenever a user takes an action such as changing the status of a record, you can have the system omit said record if it should fall out of the set, or have it sort to the appropriate position.

                       

                      As far as the script going back to the earliest dated record, is that record before today? That shouldn't be happening, assuming you have the correct date field in this step:

                       

                      Exit Loop If [ Date Due >= Get ( CurrentDate ) ]

                       

                      where "Date Due" is the date you're testing.

                       

                      Mike

                      • 8. Re: I have a contact action section and I want to go to today's actions
                        express

                        Thanks Ray, your insight was most helpful. Just to let you know I am providing the full list of Actions on the standard database but using your idea of a portal for the Filemaker Go application which gives a good abbreviation for the sales staff.

                        Looking through the contact application I also realise that it is too basic and will need multiple entries per contact company as we may have more than one order at a time - this is for another day (soon).

                         

                        Cheers.

                        • 9. Re: I have a contact action section and I want to go to today's actions
                          express

                          Thanks Mike, your recommendations were gratefully received an helped solve the problem. Your original script was correct, I just hadn't followed it to the letter. I also added the CreatorName part and it works perfectly.

                          I will be expanded the contact application as it is too simplistic and hopefully, if I run into difficulties, you will on hand with knowledge again.

                           

                          Thanks,