Re: How to make a retrieved Value Visible!
For anyone interested:
Someone reminded me that table.current() works the same way as table.get() and I neglected to mention that. Both of them return a pointer to the current session of a table - current session being the session that is already visible in the form.
The only difference is that table.get() requires a table name and table.current() requires a table number where the number is based on how far down the set you have to go to find the desired table. Both have advantages and disadvantages. If the set is modified and the modification changes the table number then the table number in the script will have to be changed also. So the obvious solution is to use table.get() and the name - but then somebody (like a client I was working with yesterday) goes and changes the table name.
You can also use something like this to assign a pointer called "tp" to the "accounts" table in the current form:
tp = parentform:tables:accounts.this
which works like, and pretty much has the same issues as, table.get() except that it can also be affected by table aliases. (Maybe table.get() can be affected by alias names also - I'm not sure.)
So there is no "winning". (Is there ever?) Just take your pick and be aware of the potential issues so you can make the appropriate changes when necessary.
For anyone interested:
Someone reminded me that table.current() works the same way as table.get() and I neglected to mention that. Both of them return a pointer to the current session of a table - current session being the session that is already visible in the form.
The only difference is that table.get() requires a table name and table.current() requires a table number where the number is based on how far down the set you have to go to find the desired table. Both have advantages and disadvantages. If the set is modified and the modification changes the table number then the table number in the script will have to be changed also. So the obvious solution is to use table.get() and the name - but then somebody (like a client I was working with yesterday) goes and changes the table name.
You can also use something like this to assign a pointer called "tp" to the "accounts" table in the current form:
tp = parentform:tables:accounts.this
which works like, and pretty much has the same issues as, table.get() except that it can also be affected by table aliases. (Maybe table.get() can be affected by alias names also - I'm not sure.)
So there is no "winning". (Is there ever?) Just take your pick and be aware of the potential issues so you can make the appropriate changes when necessary.
Comment