5 Replies Latest reply: Dec 7, 2015 11:25 AM by Loren Dean-Austin RSS

    How do I label data based on whether a datefield occurs before or after today's date?

      Hello, I wonder if you can help?


      I have a data set where the end date of a contract is recorded as a date for those whose contract has ended, and as a blank field (but it seems to be in date format) for those whose contract hasn't ended. I want to load this into my app as 'Contract Ended' or 'Current Contract'


      I tried the following expression:


      If(Index("contract_end_Date",(<=07/12/2015)), "Contract Ended", 'Current Contract'), 


      But when the script loads is says : ')' expected.


      I am basing this on a piece of scripting that has worked in the same app which was as follows:


      If(Index(e_mail, '@'), 'Has email', 'No email'),



      Can anyone help?

      Thank you!


      Loren Dean-Austin