Forum Discussion
Michael_W_Barro
4 years agoQrew Member
The easiest way to handle this kind of thing is to first create some formula checkbox fields (IsWithinLast6Months and IsWithinLast12Months) for your conditions. If you are always anchoring to the current date, the formula fields would look something like this:
IsWithinLast6Months:
If( Length(ToText([Last Incident])) > 0 and
[Last Incident] <= Today() and
ToDays(Today() - [Last Incident]) <= 183,
true,
false
)
[Last Incident] <= Today() and
ToDays(Today() - [Last Incident]) <= 183,
true,
false
)
IsWithinLast12Months:
If( Length(ToText([Last Incident])) > 0 and
[Last Incident] <= Today() and
ToDays(Today() - [Last Incident]) <= 365,
true,
false
)
[Last Incident] <= Today() and
ToDays(Today() - [Last Incident]) <= 365,
true,
false
)
Once you have these fields created, use them within your form rules to drive your display/hide logic for other stuff (fields or sections) on the form.
Regards,
Michael