0 Replies Latest reply: Apr 16, 2015 4:06 PM by Kevin Bertsch RSS

    nPrinting question: syntax for variable in filter expression?

    Kevin Bertsch

      Don't know if these go here, or not, but here goes:

       

      I want to use the function "FirstWorkDate(date,num of days, excluded dates). with a variable "vHolidays" in the "excluded dates" field.

      (vHoliday is simply '1/1/2016','12/25/2016','9/2/2016' etc.) to filter a report to the previous working day, holidays excluded. The function works fine today, but I wanted to add the Holidays in one group, instead of an enumerated list.

       

      First I thought I needed to use $-sign expansion, so in my filter formula, I entered:

       

      =FirstWorkDate(today(0)-1,1,$(vHolidays)), which is accepted just fine, but when I added yesterday's date to the Holiday list to test it, it still gave me data for April 15; not correct.

       

      Then I tried FirstWorkDate(today(0)-1,1,'$(vHolidays)') but this gave me "error in expression" and an empty report, instead of picking April 14.

       

      Finally, I tried "FirstWorkDate(today(0)-1,1,vHoliday), but that again gave me data for April 15, not April 14.

       

      What is the proper way to do this?

       

      thanks,

       

      Kevin