Open a table as a popup
Can anyone tell me if it's possible to open a table as a "popup" - and if so, how to write that piece of code?
(case: I have a topic-library table containing info that I need to access at different places in the database - for now I have to close the present form, go to the info-table, find the info, and then return to the actual form - very time consuming)
as far as I know there isn't a popupTable command
you could use openTable to go directly to the table
this opens the tabel called custoemrs on the all view
but this takes you away from the other table
Otherwise you could embed a table view into your form and have it on another tab or even hide it
I'm busy with work at the moment but when i get home I will show you a screen dump of how it have a vew that does this
if you wanted to to see a specifc record in the othet table you coukd use popupRecord() command
So when I'm in my jobs table I want to see all the quotes related to that customer as well as the last job done for them
so I use the popup record for the last job
and also have a table view that is limited to just that clients quotes (but you just show the whole table for your use)
So on my form I have a yes /no field called show quotes
then I added the table view
and set it to only show when the show quotes is true.
this has the effect of popping up
see screen shots
normal job screen!
screen shot when show quote = yes
Pressing the yes button (flag) makes the fields and the table view become visiable and the rest of the job is shuffled down the page out of site
(I also use a large space attribute to make the rest of the page tidy). Pressing the show quote flag again turns off the visabilty and the job returns as per the first screan shot.
As stated, this shows only the quotes that are related to that customer but it does not have to be - You could easily show all the quotes (or whever table you want to show)
I use the openRecord to show a directly linked quote for that job too and I use lots of variation of this..
ie when in jobs - show me all the jobs for today (without leaving the current job) etc
Hope above helps but as ever there will be other ways to do what you want.
my aim is to avoid all the "navigation" back and forth (or actually forth and back :)
The most appealing solution, for now, is the openRecord() function, since that will need only a button on each page (many pages)
But thanks again for your effort - I'll have a play with it.
Have a nice one :)
It's easy to add a button to add a new record. Make a button and make the code like this
let c:= create "Table Name"
you can use c.fieldname to add any default informaton. You can have numbers codes
that will add a new record to the table and it wiill show up on the view.
I have made such a button already, but sometimes one will have to see all the records in the lookup table, which is why it would be easier if it could just open "on top" instead of closing everything down, ( closeAllRecords(), openTable() ) which is easy enough - it's the way back to where you were, that is mildly frustrating.
But I'll live with that.