Just turn off store value if you do that.
# general
k
Just turn off store value if you do that.
👍 1
f
Thanks! I turn off store value, I was read this document: "Setting Validation and Defaulting Properties" in SuiteAnswers
I have a custom field "End WO", in this field the user insert a Date
Then I have a field "X" with the default value defined by formula
teh formula is CEIL ({today}-{cuscol2}) where custcol2 is the field "End WO" id
k
Best practice would be to update your custcol2 value to a meaningful ID.
(that way when someone wants to do a formula - they know what they are bringing in)
f
AH! ok, I change the Id and try again...
k
load your custom field and select the change ID button.
f
the formula is correct?? can you see?
k
if you are trying to subtract today's date and your end work order field, it seems like that should work.
that said, I've been seeing some hinkiness around date fields in columns - most often in work orders, so your formula might not work even though it looks right
I generally try those kinds of things in a saved search if I'm struggling to get it to work on the UI in the page I'm on to see if I've got an error in the layout
Also - that field won't dynamically update - it will only be set when viewing the record (after save)
f
Ahhh! I need this value field in dynamic mode, the user need see a personal ship date estimated based in a date end of Work order
k
I'd suggest using a script to make it dynamic.
f
I try and write you again....thank you very very much
k
Also - your formula should return in theory, an integer, not a date.
if you are wanting to see a date - then you'll need to adjust your formula accordingly
f
yes, I setup this field a Integer
script is a developer resource??
or a final user resource?
k
Yes, this would be a client event script - a skilled developer could do this quickly. However - depending on other scripts in your environment, it may take more time to optimize.
f
AH ok...I try change the Id, if it no modify the value, I try with a saved searches...I hope it be solucionated
k
you might try
Copy code
to_number(to_char({today},'j'))-to_number(to_char({custcol2},'j'))
f
Other question! There is a documentation about "Analytics", I nedd know how use this funcionality
It work!! Now I need a function SQL for add days to a date. Is there ??
There is a add monts a date, but I can´t see a function for add days to a date
k
just add a
Copy code
+3
to add 3 days
f
ah ok!!
You are my new best Friend!!!!