Saving properties from a child case to a parent case

Hi CC community,
could someone advice me if any way to saving/referencing case properties from a child to its parent case.
I am trying to calculate some hidden values in my parent case referencing from its child cases, but can't show the child case properties referring in the parent case.

@bwadi : Its not clear from your description as to what exactly is your requirement?

(a) Is the requirement to access parent case properties while dealing with a child case in a form ? If yes, you can use the expression :

instance('casedb')/casedb/case[@case_id = current()/index/parent]/<name-of-parent-case-property>


(b) If you are trying to access child case properties while dealing with a parent case, then in that case, make sure that your case sharing settings are correct . Once thats ensured,
you can use expression like this :

instance('casedb')/casedb/case[index/parent = instance('commcaresession')/session/data/case_id][@status = 'open']

Remember that the above expression will not return a single value but all the set of cases which are child of current parent. It means that you cannot execute statement like :

instance('casedb')/casedb/case[index/parent = instance('commcaresession')/session/data/case_id][@status = 'open']/**case_name**

as this will give 'multiple node error' because case_name will be available for multiple cases which are 'child' of current parent and CommCare will not know which case_name we want to take.
You can use aggregation expressions . For eg. you want to count number of children a parent has, then you can use :

count(instance('casedb')/casedb/case[index/parent = instance('commcaresession')/session/data/case_id][@status = 'open']) 

@bwadi

If you would like to save case properties to the parent case when completing a form for a child case, you can do this via the normal case management process but when listing the name of the case property you prefix it with "parent/" (without quotes) and then the name of the parent case property.