Hi All. I need to create a “calculated” date field...
# administration
j
Hi All. I need to create a “calculated” date field, but I’m really not quite sure how to do it. It needs to hold the value of the date field of a sales order + X number of weeks. X represents an entry from a custom list. The values in the list are text like  “4-6 weeks”, etc… So using the previous value I want to add the sales order date + 6 weeks for come up with a date. Any ideas are welcome. Thanks!
n
If the custom field is selected on the sales order then you can use SQL to make the calculation. CASE WHEN {custbody_yourlistselection} = ‘6 week selection’ THEN {trandate}+42 ELSE WHEN {custbody_yourlistselection} = ‘4 week selection’ THEN {trandate}+28 ELSE {trandate} END. It’s not stored formula date field.
j
@Netsuite Tragic Thanks Wayne! I was thinking that i need to script it, but this will work. A little tedious and will break if the underlying list changes, but as long as i'm on top of it, that should work. Hope all is well in your world. I'm seeing lots of news lately about what's going on in your area...
n
All good here. Living the NetSuite “work from hone” dream. BTW You could alternatively use {custbody_yourlistselection.id} which will let you compare to the Sublist IDs instead of the text.
💪 1
j
@Netsuite Tragic That works Wayne! Thank you much!