Hello, I am trying to constrain a field called 'sampletime' based on another time field, 'parameter_time1'. Basically I would like the 'sampletime' field to be later than the 'parameter_time1' field, but only if there is a value (a time entry in 'parameter_time1'). If there is no entry, then the constraint shouldn't apply. Here is what I have in the constraint field for 'sampletime':
if(string-length(${parameter_time1}) > 0, '.>${parameter_time1}')
But the constraint of .>${parameter_time1} is applied even when parameter_time1 is blank. Any ideas on what I'm doing wrong?
Solved! Go to Solution.
Hi
if(string-length(${parameter_time1})>0,.>${parameter_time1},true())
This seems to work for me in the constraints column of parameter_time.
First check if parameter_time1 was provided, if it was then check that parameter_time is bigger than parameter_time1
Hope that helps - i think you had some quotes in there that wasnt necessary.
Hi
if(string-length(${parameter_time1})>0,.>${parameter_time1},true())
This seems to work for me in the constraints column of parameter_time.
First check if parameter_time1 was provided, if it was then check that parameter_time is bigger than parameter_time1
Hope that helps - i think you had some quotes in there that wasnt necessary.
This worked, thank you. I think I was staring at it for too long 🙂