Thanks for the reply. After further debug I figured the root cause of my problem.
Problem statement: While running in the loop,the input choice gets updated but the graph is the same for all input choice.
Root cause: I have joins in the script.So each time the script runs the tables are saved with suffix 1,2 so on.
But since the join logic has the original table name,the tables dont get updated.Each time the tables get joined with original tables(tables created on first run) and the output graph is the same.
Solution: I tried Try(close(out_table,no save)) but with no luck.
Any help in this regard is appreciated.