2 Replies Latest reply on Apr 29, 2011 9:51 AM by philmodjunk

    Pass "find parameters" into an email

    jrobgk1

      Title

      Pass "find parameters" into an email

      Post

      Greetings-

      I want to use the date range i enter to search a field as part of an email to the record related to the request.  

      For instance, if i choose the date field, enter range of 3/29..4/10, I would like to pass the 3/29..4/10 into an email to let the person who receives the pdf to know what the parameters of the search were through automation. with over 100 of these emails to do, i would prefer to script this out...

      Any thoughts would be most helpful!

      Jesse

        • 1. Re: Pass "find parameters" into an email
          bumper

          Create a Global field (text) for the purposes of the search. Assuming the search field is named Date.

          Enter your find criteria into the global field in Browse Mode. I like putting it in the header, but you could even use a custom dialog

          Script the find:

          Enter Find Mode (no pause)

          Set Field [Date] Global

          Perform find       ... Note you can add a lot more to a Find script, based on the results of the find...

          Then use the contents of the global field in the email where ever you want.

          You didn't say what version of FMP, the above works with the most versions, in 11 you can use a variable.

          • 2. Re: Pass "find parameters" into an email
            philmodjunk

            Yes, and I usually use two global date fields for date ranges. That way I can add drop down calendars and the field validation catches many date typos. I then use an expression in the Set Field expression of a script like Bumper suggests to construct the date range expression by using Table::gDate1 & "..." & Table::gDate2.