Display condition based on date

Can any help me how to display different Groups with in Follow up form
based on date.

I have one registration form and follow up form i have linked date of
enrollment from registration form to followup form. using this variable i
need to display followup 1 after 7 days of enrollment date and followup 2
in 21 days and followup 3 in 28.

The structure of my app is like this

Registration
Follow up
Group 1-Follow up 1 - visible after 7 days of enrollment date.
Group 2 -Follow up 2 - visible after 21 days of enrollment date
Group 3- Follow up 3 - visible after 28 days of enrollment date

Thanks

Hi!

This should be fairly straightforward using a Display Condition on the
groups.

CommCare presumes that dates can be included in arithmetic and represents
the dates in an arithmetic expression as “The number of days past Dec 31,
1969 that date occurred”, so if you subtract two dates, the result is the
number of days between them.

in this case the calculation would be something straightforward like

today() - date(#case/name_of_date_of_enrollment_property) > 7

-Clayton

··· On Wed, Oct 11, 2017 at 10:05 AM, wrote:

Can any help me how to display different Groups with in Follow up form
based on date.

I have one registration form and follow up form i have linked date of
enrollment from registration form to followup form. using this variable i
need to display followup 1 after 7 days of enrollment date and followup 2
in 21 days and followup 3 in 28.

The structure of my app is like this

Registration
Follow up
Group 1-Follow up 1 - visible after 7 days of enrollment date.
Group 2 -Follow up 2 - visible after 21 days of enrollment date
Group 3- Follow up 3 - visible after 28 days of enrollment
date

Thanks


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.