Open table in another folder

Hi all!

Is it possible to do this, I have program with one window runing in
folder c:\a and i want to access to example folder c:\b, open some tps
table (which is not opened in data section from that window, but exists
in dictionary) and loop trough it? Thank you!

Hi Dragomir,

If this is ABC application and you have variables for the Name attribute in the dictionary for your table you can use this:

If you don’t have variables for the Name in the dictionary you can still change the file for the table with:
MyTable{Prop:Name} = ‘C:\b\filename.tps’

In either case make sure the table is not open before you try to change the name.


Thank you for your reply !

You are probably using the simple filename to access each tps file in your data folder. For example, customer.tps. You don’t need to provide the full pathname of the tps file name, that is, c:\a\customer.tps.
You can access a tps file in another folder by just providing the full pathname in the dictionary, c:\b\customer.tps.
Now, if you don’t know the full pathname of the other folder until runtime, you can use a global variable for the filename in the dictionary, like this, !Glo:CustomerFileName. Note the !. This indicates the filename you’re providing is a variable.
Then, at runtime, before you try to open the file, you need to assign a full path filename to your variable, like this:
Glo:CustomerFileName = ‘c:\b\customer.tps’, or maybe it might be Glo:CustomerFileName = ‘c:\x\customer.tps’.
Or it can be a whole bunch of different folders. Just close the file, change the Glo:CustomerFileName, and open it again (in another folder).