6 Replies Latest reply on Jul 20, 2012 2:57 PM by philmodjunk

    constraining find with variable

    jayGamel

      Title

      constraining find with variable

      Post

      I've tried a hundred ways of doing this but nothing works. FMP11/mac Intel>

       

      I have two compound finds: active and ongoing, active and fifteenth(or first). From this found set, I wish to omit any record that already has a specific issue number (which changes every 15 days). I have a current issue calculation that works fine. If I set up finds using the actual current issue number, no problem. I can't set it up to use a global variable already set to the current issue number ($$ci)

       

      Here's a screen shot of what works

       

      How can i make it work with the variable instead of the actual issue number?

       

      Thanks for any help.

      Screen_shot_2012-07-20_at_11.28.28_AM.png

        • 1. Re: constraining find with variable
          philmodjunk

          I would think that putting:

          $$ci

           in place of

          =497

          would do the trick, but I prefer to script finds like this:

          Enter find Mode [] //clear the pause checkbox
          Set Field [Ads::Active ; "yes" ]
          Set Field [Ads::Frequency ; "Ongoing"]
          new record/Request
          Set Field [Ads::Active ; "yes" ]
          Set Field [ads::Frequencey ; "fifteenth" ]
          New record/Request
          Set field [Issues::IssueID ; $$ci ]
          Omit Record
          Set Error capture [on]
          Perform Find [] //note that no criteria is stored in this step

          The advantage to this method is that if I review this script at a later point and time in the script editor I do not need to double click a script step to check and see what criteria is being used to perform the find.

          • 2. Re: constraining find with variable
            jayGamel

            Oh, putting $$ci does NOT do the trick. That's the first thing I tried.

            • 3. Re: constraining find with variable
              philmodjunk

              As a test, I ran the script shown in the screen capture. It successfully found all records with "Demo" as a word in the TutorialTitle field but omitted the record where TutorialID was 38--even though it has Demo in the TutorialTitle Field.

              • 4. Re: constraining find with variable
                jayGamel

                Phil, 

                My menus and screens are different, mac/pc difference i suspect. 

                Here's my find setup that doesn't work

                • 5. Re: constraining find with variable
                  jayGamel

                  And somebody should fix the "Post a Answer" bar on this website. Tongue out I might have to go buy an dictionery ...

                  • 6. Re: constraining find with variable
                    philmodjunk

                    Remove the = sign. You can't put a math expression into a "stored" criterion, only the name of the variable.

                    bar on this website. Tongue out I might have to go buy an dictionery ...

                    Brace yourself, I pointed that out to ModMan--our forum Moderator a long time ago. It turns out this is not a setting he can fix. When he reported it as a bug, they (RightNow--currently owned by Oracle as I understand it), responded that he could suggest this,  "new feature" and they'd consider it. Undecided He was unable to convince them that this was a bug in their software.