But I’m not able to the same with the ancestors of this place, I can get the _id of the c30_supervisor_area with
../inputs/contact/parent/parent/_id
but not other info of this place like name or whatever in his doc.
The same occurs with his others ancestors, like c20_health_area or c10_site only _id is avaliable.
Is there another way to get access to all ancestors info in addition to the _id ?
When referencing the _id field of the c30_supervisor_area in your form, are you using the contact selector functionality (select-contact or db-object)?
Loading this contact data in the inputs can be a little confusing since you will get any of the data already in the contact doc (e.g. the _id) automatically, but if you want to hydrate anything on the parent docs, you need to use the contact selector on those _id fields… Once you have setup the _id field with the contact selector appearance, the sibling fields should automatically be populated with the data from the identified document.
@bamatic would it be possible for you to post a more complete table of the config you are using (at least for the inputs)? Also, what version of the CHT are you running?
These will be helpful when trying to recreate this issue!
I am not sure if this is the root cause of your issue, but it is a place to start. You do not want to have two separate contact selector fields (e.g. db:person) in the same group since that could cause collisions when trying to load data from both into the group.
To load the data for the aire_de_sante (assuming that is a different id value than parent/_id) then I think the best thing to do would be to just define that field as a string instead of a db:person. Then, in a new group (that could just go at the root level, or wherever else makes sense) you could load the data for that doc:
I have tried all those combinantions, use string, with both apperanbce use db;person and string etc etc indeedd for the chw_area and the aire_de_sante key we dont have problems, but for the levels up to this level we can only get the _id
our hierarchy is person->c50_family->c40_chw_area->c30_supervisor_area->c20_helath_area->c10_site
I don’t know the cht-core source code, but it looks like the data population from couchdb doc to enketo forms, could maybe not hydrated for some high levels ? we are able to get from app forms data for the doc for levels till c40_chw_area, tomorrow I will try to do the same in 3.15 thank you
CHWs would log in at c40_chw_area and as such would have no visibility to documents from c30_* and above since they are ‘restricted to their place’. This behaviour is consistent across all cht releases for users restricted to a place.