I am trying to use a UDF attached to the customer for a numeric field (1-10) to subtract days from a date field (=DateAdd([SOOrder.RequestDate], 'd', -[Customer.AttributeCUSTRANSIT])), If I use a Number in place of the Attribute this works fine, I need to have the attribute value so this is dynamic by customer order. (Note: I am already using Lead time for another function, and this is a separate calculation). I have tried all the operators and cannot get anything that will use the attribute field in the calculation. I am open to any suggestions!
Answer
Using a UDF (Combo) for value to subtract from a date field
Best answer by miguel80
Hi!
Try converting it to an integer first:
=DateAdd([SOOrder.RequestDate], 'd', -CInt([Customer.AttributeCUSTRANSIT]))
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.