Feb 02, 2022 05:20 AM
Hi there,
I want to create a field that gives a different message to the user, depending on whether they have filled in a particular field ‘on time’ or not.
I’ve attempted to explain it in text. If anyone could suggest the functions I need to use, I would really appreciate it. The problem for me is a. how to say ‘IF time is less than 5 minutes towards the time in the field OR IF time is more than 3 hours after time in field’ and to link that to b. ‘… AND field x has not been filled in THEN ‘show message a’’ and c. linking several options together (x3 optional messages).
IF time is less than 5 minutes before end of lesson AND there is nothing in lesson reports field THEN “Please enter your lesson report, concrete targets and homework now”
OR
(IF time more than 3 hours after the lesson end time AND there is nothing in the lesson report field THEN “Your lesson report is late. Please enter your lesson report, concrete targets and homework now”)
OR((IF the report field is filled in BEFORE 3 hours after the end time THEN “Thank you for adding your report. This really helps students and parents!”))
Solved! Go to Solution.
Feb 07, 2022 05:43 PM
Hi,
i like to use some approach for complex conditions, that is good for your case
enclose any condition in brackets, and use as 1=true 0=false
(time is less than 5 minutes towards the time in the field)
use (cond1)*(cond2) as AND , if any of them =0 then all=0
gather OR groups like this ((cond1+cond2+cond3+cond4)!=0 )
finally, imagine you have 3 conditions and want to use 2 branhes for 1st, divided to 2 branches each for 2nd, and then third, 8 options in total
use binary logic, cond1+2&cond2+4*cond3
practic usage:
SWITCH( (cond1+2&cond2+4*cond3)
,0,'first option',
,1,'second...'
...
,7,'last option' )
combine all that and good luck!
Feb 07, 2022 05:43 PM
Hi,
i like to use some approach for complex conditions, that is good for your case
enclose any condition in brackets, and use as 1=true 0=false
(time is less than 5 minutes towards the time in the field)
use (cond1)*(cond2) as AND , if any of them =0 then all=0
gather OR groups like this ((cond1+cond2+cond3+cond4)!=0 )
finally, imagine you have 3 conditions and want to use 2 branhes for 1st, divided to 2 branches each for 2nd, and then third, 8 options in total
use binary logic, cond1+2&cond2+4*cond3
practic usage:
SWITCH( (cond1+2&cond2+4*cond3)
,0,'first option',
,1,'second...'
...
,7,'last option' )
combine all that and good luck!
Feb 09, 2022 05:16 AM
This looks very good but a bit beyond my brain today! I will mark it as a solution for others. THank you