Solved! Go to Solution.
Your requirement: if there is “ESD” or “ETA” in “1st GI” or “ 2nd GI” then I want to say “ In Transit”
Your code: Contains ([1st GI],'ESD') OR >"2023-01-01" AND (ISEMPTY([2nd GI]) OR Contains([2nd GI],'ETA'))
You can't have code like OR >"2023-01-01"
You always need a field name before the OR
and the "AND" before (ISEMPTY([2nd GI]) should be "OR"
It also looks like you have an issue with the data type for field [1st Gl]. I think this field must be a String data type, but in your code you're trying to compare the field value to a static date value "2023-01-01".
You can try this option: use a Formula tool to create a new field like "1st Gl Date values", and convert the String values to Date format, then try code like this:
Contains ([1st GI],'ESD') OR [1st Gl Date values] >"2023-01-01" OR (ISEMPTY([2nd GI]) OR Contains([2nd GI],'ETA'))
Chris
I can see a couple of immediate problems with this.
1. You're treating [1st GI] and [2nd GI] as dates in the formula, but they are not date fields
2. Your formula is incorrect at ELSEIF.
Current: Contains ([1st GI],'ESD') OR >"2023-01-01" AND (ISEMPTY([2nd GI]) OR Contains([2nd GI],'ETA'))
Corrected: Contains ([1st GI],'ESD') OR [1st GI]>"2023-01-01" AND (ISEMPTY([2nd GI]) OR Contains([2nd GI],'ETA'))
Thanks, I will change the formula and change to a date and see.
Thanks
Mike