Set default value of a date field based on another field
Example, check if the reminder date field is empty, if it is then set the value to 30 days before the Term End Date. If the date field is not empty then set the value to the existing value
if(normalize-space(//DOCCON_CONAPPROVAL_REMINDER_DATE/text()) = '') then (xs:date(//DOCCON_CONAPPROVAL_TERMEND) - xs:dayTimeDuration('P30D')) else //DOCCON_CONAPPROVAL_REMINDER_DATE