3 Replies Latest reply on Oct 23, 2012 6:47 AM by Sorbsbuster

    Perform Find Script

    Annette

      Title

      Perform Find Script

      Post

            Hey all,

           I'm trying to create a script to run in a report but unsure how to add one particular step.  Basically I have the following fields I am working with: 

             
      •           Accepted Date:
      •      
      •           Pending Date:
      •      
      •           Ineligible Date:
      •      
      •           Discharge Date:
      •      
      •           Referral Type:
      •      
      •           MDT Date:

           Originally I didn't have the pending field so my script was very simple (to me) .  What I was trying to do was find EIT referrals that were accepted but have not been discharged or found ineligible yet and hadn't had an MDT Date yet.  So my find looked like this:

             
      •           ReferralType = "EIT"
      •      
      •           AND Ineligible Date =
      •      
      •           AND Discharge Date =
      •      
      •           AND Accepted Date = *
      •      
      •           AND MDT Date =

           That worked fine.  BUT, now I have to take another option into consideration.  I have to add where there is an Accepted Date OR a Pending Date....then all the other options I had.  I'm just not sure how to add that OR piece in the Perform find / Script area.  Is this something simple that I'm missing and overthinking? 

            

            

        • 1. Re: Perform Find Script
          Orlando

               Hi Annette Lynam,

               If you open the Specify Find Request dialogue you should see you original request, click new at the bottom left of this screen and you will get a new Edit Find Request dialogue, then add in the additional find criteria you require

               Hope this helps

               -- Orlando

                

          • 2. Re: Perform Find Script
            Annette

                  I'd tried adding a new request to the existing one above but it does not find the pending results, only does the original find.

            • 3. Re: Perform Find Script
              Sorbsbuster

                   That method should work - though I'm not familiar with it as I never use it (or very rarely).  I find that it is more explicit if you build up searches a more long-handed way.  Your script could look like:

                   Enter Find Mode
                   Set Field [ReferralType ; "EIT"]
                   Set Field [Ineligible Date ; ""]
                   Set Field [Discharge Date ; ""]
                   Set Field [Accepted Date ; "*"]
                   Set Field [MDT Date ; ""]

                   New Record/Request

                   Set Field [ReferralType ; "EIT"]
                   Set Field [Ineligible Date ; ""]
                   Set Field [Discharge Date ; ""]
                   Set Field [Pending Date ; "*"]
                   Set Field [MDT Date ; ""]

                   Perform Find