NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: LSlowick on September 07, 2013, 06:51:06 PM
-
Hi
I have two tables SBBPM (prefix of SBB6:) and SBBBM (prefix of SBB2:)...
I have a browse on the primary table SBBPM which is joined to SBBBM. The view button for this browse opens up a form for the SBBPM table.
One of the other fields on the browse is from the SBBBM table and I wanted to set that field's 'on click' to open up a popup form that is for the SBBBM table.
How do I pass the unique key to the form so it knows what record to open?
Note... I do have a separate browse on the SBBBM table that does open this same form without any problem. So I'm basically trying to call this form from a related table.
Thanks for any help.
Lee
-
Also...
The field in the browse is SBB2:BOOK_Name, but what I'm guessing I need to pass to the form is SBB2:SYSID which is the unique key that form is on.
Thanks
-
I think what you are saying is that you have a browse with two tables, the primary table and the secondary table,
and you want the form button to open the secondary table form, not the primary table form?
the easiest way to do this (by far) is to reconstruct the browse so the secondary table becomes the primary, and the primary becomes the secondary.
cheers
Bruce
-
Bruce
Bruce
Not quite correct, this browse (lets call it browse A) has its OWN form on the primary table but one of the columns (which is from the secondary table) I want to open a different form (lets call it form B). I was using the 'on click' tabe for that column to try and open form B.
FYI.. I also have a separate browse procedure on this secondary table as (browse B) with the form B. So basically I'm trying to open form B from two different browses
Browse A (primary table A, secondary table B) --- FORM A (using view button)
--- FORM B (on click of one of the columns)
Browse B (primary table B) --- FORM B
Hope this makes it clearer.
Thanks
Lee
-
clearer yes - but I think you'll need to post a small example showing the technique so I can see how you might be able to do that.
cheers
Bruce
-
Bruce
Sure... I work something up.
Thanks
Lee
-
Bruce
Here's the app, dct, and tps files.
Once you compile run if you click on the browsefileB from the menu and then click on any of values in the rows for column 'A_sys_id" it will open up the UpdateFormA. I'm not sure how to configure the BrowseFileB column 'onclick' to pass and open the correct related entry for UpdateFormA.
On BrowseFileB ..,.if you click on the standard insert/change/delete buttons it will open up UpdateFormB which is the standard Browse / Form relation.
[attachment deleted by admin]
-
Bruce
Just wondering if you had a chance to look at this.
Thanks
Lee
-
Hi Lee,
tip: your example was complicated by your naming structure. Between File A and File B I was going cross-eyed trying to figure out what was what. In future just give the files something reasonable as a name. I changed everything to "Parents" and 'Relations" and it got much easier to understand.
As it happens the solution is very simple, it's a matter of getting the "parameters" to the on-click correct.
'Change_btn=Change__btn&Fil:SysID=' & Fil:SysID
The first part tells the receiving form that it should be in "change mode" (not insert or delete mode or something.) Without this the form won't load the record. The second part (after the &) tells the receiving form what the ID is of the field we want to edit.
Incidentally this same URL would work if you made the Parent "Name" clickable - you don't have to show the parent ID.
Cheers
Bruce
-
Bruce
Sorry about that, I was just trying to get the example setup and didn't really think about any sort of naming issue.
I want to open this in view mode, so would it be 'View_btn=View_btn&fil:sysid=' & fil:sysid.
I plan on only using the Parent "Name' on the browse, I just was showing the id for illustration purposes.
BTW... Good luck at DevCon... would have loved to go.
Thanks
Lee
-
Bruce
That solution worked perfectly.
Thanks
Lee