I need to know how access properties of a parent contact in a child account in an Xform. This is to enable me to do some validations. For-example, the MoH Uganda team asked that when the head of a HouseHold is female, then the spouse specified under the household shouldn’t be female too.
On a technical side, you can pass info from the parent contacts through the form’s
inputs as seen in the example on the reference page. If it is data that cannot be passed in that way, it could be passed through the contact summary profile if the form is accessed from the Contact.
On a more practical side, how is this info being helpful for workflows? That may affect how and where you set and access the data.
For what it is worth, I do not think we support loading contact summary data into
contact forms (only app forms). But, you still should be able to access the sex for the head of the household by referencing the
person > parent > contact > sex field. (When creating a new person in a household,
parent is the household contact and its
contact field is the primary contact for the household.)
Here is a modified copy of the default
person-create xlsx form from
cht-core that I used to verify I could load the sex value for the head of the household into a note when creating a new person (the 4 added rows have been highlighted yellow…).
Thanks for the added info @jkuester, as I had (mis?)understood the access needing to be from an app form.
It is worked perfectly. Thanks a batch… @jkuester