4 Replies Latest reply on May 13, 2012 3:01 PM by Sorbsbuster

    Calculated find issue

    jayGamel

      Title

      Calculated find issue

      Post

      I have a number for each publication date in a sequence in one file. I get the number of the current edition returned to a global field in the classifieds file and then look for each ad that has been tagged to run in the current edition number. The global number is looked up every time the classified file is opened (based on the date). I have a script to find all current ads and sort them by category and ranking (oldest first). The problem is the find step in the script will NOT return the global number to the issuenumber field for lookup. The global number does exist, but there are no find results. What am i doing wrong here?

      All_windows.png

        • 1. Re: Calculated find issue
          GuyStevens

          Your find is searching for "=Classlink::CurrentissueGlobal....." but is not finding it.
          While it should be looking for "494"

          The way I always do my finds is like this:

          Enter Find Mode
          Set Field
          Perform Find

          In your "set field" step you set the field you want to search in "IssueId" with the value you want to search "Current.."

          I never specify find requests. Maybe someone who does could spot what's going wrong here. Or you try the "Set Field" method.

          • 2. Re: Calculated find issue
            Sorbsbuster

            In FM you can't set find criteria to be calculations, and I suspect it is the same in the 'Perform Find' script step.

            As DaSaint says, an easier way to do it is:

            Enter Find mode
            Set Field (ClassLink ; Classlink::CurrentissueGlobal )
            Perform Find

            • 3. Re: Calculated find issue
              jayGamel

              The set field  to Classlink::CurrentissueGlobal didn't work either. but setting a variable ($current=Classlink::CurrentissueGlobal) and using the variable works fine. Thanks for the help.

              What doesn't make sense is "In FM you can't set find criteria to be calculations", since the find menu steps clearly indicate you should be able to do this. See Edit Find Requests in screen shot above.

              • 4. Re: Calculated find issue
                Sorbsbuster

                What part of the screen shot says you should be able to use calculations?  Perhaps you are being waylaid by the 'operators', or my short phrase was ambiguous.  You can have a 'calculation' such as ">494" or constrain a text search to be exact, thus, "=Apple" or "==Apple Pie".  But you can't have = Field A - Field B.

                Are you certain the global field is truly global?  They are available in Find Mode, so either way should work.