The expected behavior is: When the user enters the (Advanced) Module, s/he is prompted to select a parent case right away, then the list of child cases appears (that case type is the one configured for the Advanced Module).
Thanks for your answer. Let me give bit more context (should have in the first post).
I am trying to implement the workflow where you have the registration form in the case list (meaning the registration form is in a separate module). This is Case Type Pregnancy. Pregnancy is a sub case of Case Type Woman.
I am not organizing forms with parent/child modules because Pregnancy has child cases of its own. So both Pregnancy and Woman are top level modules.
I am using Advances Modules to implement this workflow because I want to use Shadow Form in order to avoid duplicating a complex form.
With the Parent Child Selection option in Basic Modules the user is first prompted to select the Woman, before the Pregnancy case list (with the reg. form at the bottom) is displayed. That's the behavior I'd like to replicate.
I am a bit confused because the logic is pushed to Actions in the forms, and this seems to be a module setting since the intended behavior should happen before the user clicks on a form.
The model for advanced modules is more similar to the mobile app data model where each entry (form) defines it's own set of datums (actions).
In basic modules we assume that all forms will operate on the same set of data and hence push the some of the configuration up to the module level. For advanced modules this decision is left to the app builder.
It's just that I don't see were to configure the fact that the parent list of cases (woman) should be displayed before displaying the list of child cases (pregnancy), since this should happen before the user clicks on a form.
Thanks Simon. In your example your action suggests that the form is updating the child case. I'd like the form to open a new case.
Here's the app structure:
Modules AM - Woman - Register and AM -Pregnancy - Register are hidden since they are only used to provide registration forms in their respective corresponding case lists AM - Woman and AM - Pregnancy. Pregnancy is a child case of Woman.
The exact workflow I'd like to implement is:
User click on the AM - Woman module => The Woman case list is displayed with the Register Woman (AM) form button at the bottom.
The user clicks on the Register Woman (AM) form and register a new woman.
The user navigates back to the main menu
The user clicks on the AM - Pregnancy module => The list of Woman is displayed (the parent cases is displayed - that's what I can't get configured properly)
The user selects a woman
The case list of Pregnancies for that woman is displayed with the Register Pregnancy (AM) form button at the bottom.
The user either opens the registration form or selects a Pregnancy case.
Because the logic is set on Actions at the form level, I assume that I have to configure the Register Pregnancy (AM). I don't know where else it would make sense with my current understanding (but also feel weird).
That form has the following actions:
Load a Woman case
Open Pregnancy case with Parent Indices to set up the parent/child relationship
The result is that when the user clicks on the AM - Pregnancy module the list all pregnancies is displayed. When the user clicks on the Register Pregnancy (AM) form button at the bottom of the case list, s/he indeed gets to select the Woman and then access the registration form.
If I do what you suggest, the registration form becomes an update form and I lose the "registration form at the bottom of the case list" feature. What you suggests makes sense if you want to select (not create) the child case based on a initial selection of the parent case.
The user clicks on the AM - Pregnancy module => The list of Woman is displayed (the parent cases is displayed - that's what I can't get configured properly)
You'll need to add an action to the 'Update Pregnancy' form that loads the Woman case. This is the same as you have configured for the 'Register Pregnancy' form (except for Update Pregnancy you are going to have 2 load/update actions instead of 1 load and 1 open).
Because the logic is set on Actions at the form level, I assume that I have to configure the Register Pregnancy (AM) . I don't know where else it would make sense with my current understanding (but also feel weird).
The 'registration from the case list' form is configured at the module level (since it's applied to the case list). It seems like you already have this configured.