**Formula**columns. Please bear in mind the following considerations when using Formula columns with DocuGen.

## Unsupported Functions

Function |
Example |
Workaround |

TEXT() |
TEXT({Amount},"$#,##0.00")
If Amount = 500, result is $500.00 If Amount = 1,500, result is $1,500.00 |
ROUND(100*({Amount}),0)/100
ROUND(1000*({Amount}),0)/1000 |

ADD_DAYS() |
ADD_DAYS("2019-01-20", 5) Result: "2019-01-25" |
Use General Caster to copy the result of the formula into a Date column, and use the Date column in your DocuGen document |

FORMAT_DATE() |
FORMAT_DATE(TODAY(), "YYYY-MM-DD") Sample result: "2020-02-16" |
Check how to format dates here |

HOURS_DIFF() |
HOURS_DIFF("23:00", "20:00") Result: 03:00 |
Use General Caster to copy the result of the formula into a Text column, and use the Text column in your DocuGen document |

WORKDAYS() |
WORKDAYS({TO_DATE}, {FROM_DATE}) | Use General Caster to copy the result of the formula into a Numbers column, and use the Numbers column in your DocuGen document |

SUBTRACT_DAYS() |
SUBTRACT_DAYS("2019-01-20", 5) Result: "2019-01-15" |
Use General Caster to copy the result of the formula into a Date column, and use the Date column in your DocuGen document |

SWITCH() |
SWITCH({Approved}, TRUE, 1, FALSE, 0) |
IF({Approved}, 1, 0) |

Nested Formulas

Formulas should not be nested, meaning that the formula should not refer to a column that is also a formula. The workaround is to include the full formula in the column.

If you are having trouble simplifying your formulas, contact us and we will try to help you out.

Nested formula(not supported by DocuGen) |
Equivalent formula without nesting (supported by DocuGen) |

Total Price = Amount * (1 - Discount) Amount = Quantity * Price Notice that "Amount" is a formula (Quantity * Price) that is used inside another formula (Total Price). |
Total Price = (Quantity * Price) * (1 - Discount) This formula will give exactly the same result as the nested formula on the left. |

## Comments

0 comments

Please sign in to leave a comment.