i am getting the following error on Year filter condition. after upgrading the version to 10.04

  • 1
  • Problem
  • Updated 1 year ago
  • Solved
Invalid syntax for field formula: IF((new Date(TODAY())>=new Date('01/01/2017') && new Date(TODAY())<=new Date('03/31/2017')),"Q1",IF((new Date(TODAY())>=new Date('04/01/2017') && new Date(TODAY())<=new Date('06/30/2017')),"Q2",IF((new Date(TODAY())>=new Date('07/01/2017') && new Date(TODAY())<=new Date('09/30/2017')),"Q3","Q4"))). SyntaxError: Expected "(" or [ \x0C\n\r\t\x0B  ᠎ - 

 ] but "D" found.
Photo of Raghu nath

Raghu nath

  • 70 Points

Posted 1 year ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Wild guess is that it is the spaces between "new" and "Date". Try making it one word and see if that helps.
Photo of Christine Jessen

Christine Jessen

  • 670 Points 500 badge 2x thumb
Raghu -

This formula field is using javascript syntax instead of the Skuid formula syntax.  Use the following syntax instead:
IF((MONTH(TODAY())==1 || MONTH(TODAY())==2 || MONTH(TODAY())==3), "Q1", IF((MONTH(TODAY())==4 || MONTH(TODAY())==5 || MONTH(TODAY())==6), "Q2", IF((MONTH(TODAY())==7 || MONTH(TODAY())==8 || MONTH(TODAY())==9), "Q3","Q4")))
You can reference this article for more information on the Skuid formulas that are accepted in the UI-Only fields:
https://docs.skuid.com/latest/en/skuid/models/ui-only-models-fields.html

Thanks!
Christine
(Edited)