5 Replies Latest reply on Jun 29, 2015 4:12 AM by KylerPhilips

    Reasons for decline requests Filemaker

    KylerPhilips

      Title

      Reasons for decline requests Filemaker

      Post

      I have a Request list view which manages requests for clients at my organisation. When an agency accepts a request, a script grabs the following from the user that is logged in $$CurrentAgencyId (_pkAgencyId), $$CurrentStaffId (_fkStaffId) - this is done just through a simple find request at start up. It stores the relevant variables in my Staff Request join table. However, I want to store reasons for declining a request, what's the best way of doing this?

      I have created a Requests_Declined table would this be the best way to go about this with _fkAgencyId and _fkRequestId having a relationship. 

       

       

       

        • 1. Re: Reasons for decline requests Filemaker
          philmodjunk

          The most commonly used script would look something like this:

          Set Variable [$RequestID ; value: Requests::__pkRequestID ]
          Go To Layout ["Requests_Declined" ( Requests_Declined ) ]
          New Record/Request
          Set Field [Requests_Declined::_fkAgencyID ; $$CurrentAgencyID ]
          Set Field [Requests_Decliened::_fkRequestID ; $RequestID ]
          Go to Layout [original layout ]

          But this only creates the new record. You would still need to have the user enter the text describing the reason (or select the reason from a value list.) This could be done with a global field before this script is run and then there is a third set field script step.

          Or you can do this without any script if you add a portal to Requests_Declined right on your Requests layout with a relationship that has the "allow creation of records via this relationship" option enabled. The use can create the record automatically by entering a reason into the field in the portal row. (And if you only need to log a single reason, you don't even need the portal, you can just put the field directly on the layout.)

          • 2. Re: Reasons for decline requests Filemaker
            KylerPhilips

            Okay, I've managed to do this although preferably I'd like to use a Custom Dialog with a dropdown list for data consistency and have a value list defined for the global value to be set.  

            • 3. Re: Reasons for decline requests Filemaker
              KylerPhilips

              In a previous thread (http://forums.filemaker.com/posts/cd2729767e) we talked about only showing requests that had no agency id associated to it. If a specific agency declines a request how can I filter the same list view so that they cannot see the request any more.. 

              • 4. Re: Reasons for decline requests Filemaker
                philmodjunk

                I'd like to use a Custom Dialog with a dropdown list

                This is not possible in FileMaker. What IS possible is to use either a custom layout with the New Window step to open a new modal window for this, or you can put the dropdown list field inside a popover button if you are using FileMaker 13 or newer. I find the popover a simpler options to implement--especially on windows systems.

                A list can be a set of records in a list view, a set of records displayed in a portal or a value list--which can be a conditional value that only displays data from a specified table from records that match specified criteria....

                I originally read your "drop down list" as a drop down list of reasons for denying a request. But if you want a drop down list of Requests where an agency ID field in the same table is empty, then what I call a "hardwired conditional value list" can do that. See the example of that name in:

                "Adventures in FileMaking #1 - Conditional Value Lists"

                • 5. Re: Reasons for decline requests Filemaker
                  KylerPhilips

                  Managed to get this working quite nicely, I created a popover which stores a global value field which is also a dropdown. The popover has a submit button that goes to requests declined layout and fills appropriate fields. Thanks