NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: LSlowick on August 15, 2013, 08:14:12 AM
-
Hi
I have a form that one of the fields is a browse. How do I filter the browse relative to the particular table the form is on?
The form is using Table A... on one of the tabs I have a browse 'field' for table B. The only data/table definitions in the B browse are for table B.
In the B browse how do I setup a filter like B:field=A:field. How do i get the A:field passed to the B browse so I can use it?
thanks
LEE
-
Hi Lee,
If A:field is the primary key field for file A and A:field is a strig type field, you just do:
'B:field = <39>' & p_web.gsv('A:field') & '<39>'
Please use all the quotes!!!
Where p_web.gsv('A:field') is the session queue value that holds the key value for the record in file A.
The <39> are the quotes you need to put around the string value.
When A:field is numeric, just loose the '<39>' .
When A:field is not a key field, you first have to retrieve the value of A:field from the A file before you can use it in the filter.
Cheers,
Rene Simons
-
Rene
It's not the primary key. I think I actually tried your solution prior to posting the question. The problem is had was that the browse B complained that A:field was not defined or at least I think that is what it didn't like. I'm new at using nettalk so it could have been something else I had done wrong. On the next situation like this I'll try your method again.
1) What is did do to get it working was when I added the browse B to the form A's tab I used the 'parameter' section to pass as follows: 'pOrderNo' = A:Field.
2) Then on the Browse B I added a conditional filter 'child of FormA' and added a range filter as:
B:field , single value, range limit value: pOrderNo
This seems to work.
Looking at the code it seems that #1 does a set p_web.Setvalue('porderno') in the UpdateFormA just before it calls the BrowseB and then in in the browseB there is a p_web.Restorevalue('porderno')
If this is an incorrectly method or possibly problematic let me know.
Thanks for your response.
-
Rene
I just tried the method you provided. It worked perfectly. I think what I was doing before was a combination of inexperience with nettalk and some syntax errors. This method is much easier than what I used before.
Thanks again.
Lee
Hi Lee,
If A:field is the primary key field for file A and A:field is a strig type field, you just do:
'B:field = <39>' & p_web.gsv('A:field') & '<39>'
Please use all the quotes!!!
Where p_web.gsv('A:field') is the ssession queue value that holds the key value for teh record in file A.
The <39> are the quotes you need to put around the string value.
When A:field is numeric, just loose the '<39>' .
When A:field is not a key field, you first have to retrieve tha value of A:field from the A file before you can use it in the filter.
Cheers,
Rene Simons