Change property based on child field

Hi @Rehan_Ansari

You see and understand this code. I hope You will find a solution.

Thank You!