I'm trying to replicate your formulas however, I don't know which expression you are using to get /Name or /Code in the formulas below. Also not sure what you did on the last formula to get /../../
Situation_1")/SubPara/Situation[count(current()/preceding-sibling::my:group3)
+ 1]/Name
concat(xdXDocument:GetDOM("Situation_1")/SubPara/Situation[count(current()/preceding-sibling::my:group3)
+ 1]/Code, ".")
Name[Number = count(current()/../../preceding-sibling::group3) + 1]
Thank you.