Toad World® Forums

TDP Variable Scope

How is variable scope handled in data point and can nested objects be referenced using dot syntax or some other method?

Hi, can you give me some example in which activity and what type of variable do you mean?
You are bale to use variable in SQL as "replace string" feature or as a Bind variable

Example:
select * from #Variable#..ADDRESS

Filip

I probably should run some tests, but for example if I have a conditional with a record count variable outside of another group or another loop can that variable be accessed so perhaps it can be referenced from more than one place? I'm trying to figure out if the scope is localized. My assumption is that if something is contained within another object it might not be accessible unless all variable scope is global and can be accessed using dot syntax. It's not really clear. Since loops use a #loop.variable# convention I was wondering if that extended to other objects and if so how does someone access variables nested inside multiple objects (e.g. groups, parallel paths, loops, record counts, etc). Does something like this work (#group.parallel_path.loop.variable_name#)?