2 Replies Latest reply on Sep 28, 2012 1:24 PM by comment

    Problem: Finding a Data range in FM Pro Adv v12 using Global Variables

    user12884

      I have been trying to a Script based FIND Date Range request in v12 of FM Pro Advanced. (Version 12.0v2)

       

      Desire is: Find records when Date Field = $$Month1 ... $$Today (I.e. when 8/27/2012 ... 9/28/2012)

       

      I set Variables:

       

       

      $$Today as today's date (later to be any choice by user)

      $$Month1 as a calculated date (i.e. $$Today - 30)

      Notes: Globals show up correctly in Data Viewer Tool when the script is run.

      The script is run with full access privileges

       

       

      Results are very interesting:

       

      Senario 1. when Date Field --> $$Month1 ... $$Today --> Yields a find statement with in the field as: $$Month1 ... $$Today

      causing an error --> "The provided Find criteria is not valid. Enter a valid request before proceeding."

      It does NOT substitute the Global Variable Dates correctly.

       

      Senario 2.when Date Field --> $$Month1 & "..." & $$Today --> Yields a find statement with in the field as: 8/29/2012 & "..." & 9/28/2012 causing an error --> "The provided Find criteria is not valid. Enter a valid request before proceeding."

      But is substituting the Global Variable dates correctly but not handling the text manipulations.

      Note: I also tried to create the combine string in a text field, use the txt field and that did not work either.

       

      Senario 3. when Date Field --> 8/29/2012 ...9/28/2012 -->Yields a find statement with in the field as: 8/29/2012 ...9/28/2012

      Working as expected yielding 884 found records.

       

      Senario 4. when Date Field --> $$Today --> Yields a find statement with in the field as: $$Today

      causing an error --> "The provided Find criteria is not valid. Enter a valid request before proceeding."

      It does NOT substitute the Global Variable Date correctly.

       

       

      Question 1: Have I just identified a bug in v12 FM Pro Adv? I need help trying to use two variables as part of a Date Range Find calculation.

       

      Question 2: Can anyone help?

       

      All the best,

       

      Richard

      rkrebs@5pFusion.com