@brixt.macharia,
There must be variable scope differences. Open the Variables panel and change the variable scope to higher level.
Like this:
Documentation here for reference.