2 Replies Latest reply: Jan 25, 2018 10:56 AM by Sofia Vaz RSS

    Issue with a variable not working

    Sofia Vaz

      Hi all,

       

      I have this expression that is working exactly as I want while it is in a text box. However, when I define the expression as a variable it stops working! Do you have any idea why?

       

      =if(GetFieldSelections(OrdItemInsDt)>0,

        (if(GetFieldSelections(OrdItemInsDt)<7,

          date(min(OrdItemInsDt))& ' to ' & date(max(OrdItemInsDt)),

        (if(Left(GetFieldSelections(OrdItemInsDt),3) = '',

        max({<Year-={$(=SubField(GetFieldSelections(OrdItemInsDt),'',2))}>} OrdItemInsDt),

        date(min(OrdItemInsDt)))& ' to ' & if(Left(GetFieldSelections(OrdItemInsDt),3) = '',

        max({<Year-={$(=SubField(GetFieldSelections(OrdItemInsDt),'',2))}>} OrdItemInsDt),

        date(max(OrdItemInsDt)))))),

        $(vLastInsDtWeek))

       

      Thank You!