Hi @IshaJa
I have found this https://gist.github.com/dlh3/248aa56ba7301f65e29f435c7cb03de0 which can help you in a way.
Basically, you are setting some value on calling template and then after calling the template, you need to access the set variable in main HTL.
Please go through https://gist....