Syntax examples for row-update Expression, especially for a date field

I have a date field that I want to have calculated based on a date field and a numeric field I have on a screen. In application studio I have an event, triggered on either field changing, which call row-update. I can’t figure out the syntax in Expression to get that to work. I basically want DateField1 = DateField2 - IntegerField, where the IntegerField is in days.

I’ve tried {Table.DateField2} - {Table.IntegerField}, like doing a numeric field expression, which didn’t work. I tried something more like SQL with DATEADD(‘dd’,{Table.IntegerField},{Table.DateField2}), which also didn’t work. What is the syntax for modifying dates?

A link to the syntax for all types of calculations for Expression would be helpful, especially if added to the help. The help only says " Expression - Enter the expression that will update the selected row." which basically tells us nothing.

Thanks for your help.

Can you post the actual syntax you are attempting? The DateAdd should work wonderfully.

The field I’m trying to modify and is in the row-update->Parameters->Columns EP Binding field is QuoteHed.RequestDate.

I have tried a syntax of following in the row-update->Parameters->Columns Expression field
DATEADD(‘dd’,{QuoteHed.TransitTime_c},{QuoteHed.NeedByDate})
DATEADD(‘dd’,-5,{QuoteHed.NeedByDate})
DATEADD(day,-5,{QuoteHed.NeedByDate})
“DATEADD(day,-5,{QuoteHed.NeedByDate})”
“DATEADD(day,-5,?{QuoteHed.NeedByDate})”
DATEADD(day,-5,QuoteHed.NeedByDate)

None have caused a change in Request Date. I know the event is firing because right before the row-update call I have a message box pop up.

Sorry, I completely misread what you are doing. You are trying to set a field value in Kinetic when the NeedByDate changes (or is set)?
Use a BPM for this. The logic would be C#. Something like:

QuoteHedRow.NeedByDate.AddDays(QuoteHedRow.TransitTime * -1)

That’s great James but I am hoping to do the change within application studio. That way the user can see the value updating when it happens not after they have saved the record.

Also I would very much like to know the syntax that works in the Expression field, since I can’t find that information anywhere. I’m sure I’m not the only one who would find that very helpful.

I was hoping someone would respond because I have not found this in any documentation or been able to figure the syntax out.
What I am doing for dates at this point is passing it into a function, modifying the date then sending the new date back as a response. Then use row-update to update the field of the row and the user sees the change immediately.