End Date=CASE WHEN ({custbody_leadtime} IS '2-4 We...
# general
a
End Date=CASE WHEN ({custbody_leadtime} IS '2-4 Weeks' THEN {enddate} IS to_date({trandate}) + 28 END ELSE CASE WHEN {custbody_leadtime} IS '4-6 Weeks' THEN {enddate} IS to_date({trandate}) + 42 END ELSE CASE WHEN {custbody_leadtime} IS '8-10 Weeks' THEN {enddate} IS to_date({trandate}) + 70 END ELSE CASE WHEN {custbody_leadtime} IS '10-12 Weeks' THEN {enddate} IS to_date({trandate}) + 74 END ELSE WHEN {custbody_leadtime} IS '12-14 Weeks' THEN {enddate} IS to_date({trandate}) + 74 END
a
Is this the formula that was the solution? Or are you saying this is still not working? If not working what error are you getting?
a
It's still not working. the error i get is
" You have entered an Invalid Field Value ERROR: Invalid Expression for the following field: enddate"
a
Too many commands in there. Try this: CASE WHEN {custbody_leadtime} = '2-4 Weeks' THEN {trandate} + 28 WHEN {custbody_leadtime} = '4-6 Weeks' THEN {trandate} + 42 WHEN.....etc (then after the last clause put END
a
let me try that
i think i did try that at first and it still spit out that error message
a
You'll probably get a date format error, (which I have a work around for), but let's get the formula wokring first
a
ok wow it worked!
NOW the issue is I'd like to get it to work "after field edit" (i only got it to work "after record submit")
but when i change it to after field edit i have to change the client triggers and i have zero idea which one(s) to choose
lol
a
Why wouldn't you just use all of them? Is there a reason to not use some?
a
oh i dont know
let me try selecting all
hm its definitely not updating after field edit
a
What's your triggering client field?
a
i selected all of them?
a
Set this field to your custom body Lead Time field so whenever anyone changes the lead time, it recalculates
a
i tried that but everything just glitches on the screen when i try
a
So are you taking the End Date field, then adding the lead time to it, then resetting the end date field with the new value? If so it will just be a continuos loop of updating. You should have it update a different End Date field, then after record submit copy that field to the regular end date field?
Something must be a never ending loop of calculations that would cause that glitching...