NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: jking on March 14, 2019, 04:31:32 PM
-
Bruce,
I'm back on my PWA disconnected app for my coin collection, after a brief detour. With NT 11.07, things are back to normal for me. My main screen is a memory form that has two string variables, two buttons and a browse. See image Form.png. I enter a coin type and coin date into the string variables and a browse filter (see Filter.png) filters the table as expected.
I don't like the look of the string variables at the top, so instead I want to call another form to enter these. I created a second memory form called FilterForm and duplicated these string variables on it. I call this form from the first button (magnifying glass) and fill in the two strings. Upon returning to the main form, the original variables don't seem to be set and thus the filter does not work. Any thoughts on how I might accomplish this?
Thanks,
Jeff
-
Bruce,
This really has me stumped. I'm trying to use JS to set the variable on the original form to that I enter on the second memory form. Nothing is working for me.
Thanks,
Jeff
-
Hi Jeff,
You can zoom in on a field and click the "client-side" tab.
Here tick the "Send new value to the server"box on and click the "Server Code" button.
Double click the Add Server "Side Code Here" embed point and pick "source" as embed type.
Here you type p_web.ssv('<your clarion field equate>', your field name)
This way you park the value of the entered field in a session variable with the name of the equate.
This value is available using: myValue = p_web.gsv('<your clarion field equate>')
Hope this helps.
Ren
-
Rene,
I tried as you suggested. See image coinSearchFilter.png. I assume that when I return to the main form, I need to use coinSearch = p_wb.GSV('coinSearchFilter') in an embed. I tried On Focus, and a few of the validate embeds, with no luck.
Here is the setup I have: I have the main form called CoinCollectorForm. It has a field called coinSearch that I normally fill in directly and then use to filter the browse on this same form. See the image tree.png for how this is in the PWA app tree. The button on this form (magnifying glass) calls the second form, FilterCoinCollection. Here I have a field called coinSearchFilter. I set the server side code embed as you indicated. Still, upon returning to the main form, the coinSearch field does not contain the value entered on the secondary form. Any other thoughts?
Thank you,
Jeff
-
Hi Jeff,
As far as I understand, popups are not pages but "part of" pages.
As Bruce points out in topic http://www.nettalkcentral.com/forum/index.php?topic=7401.msg30095#msg30095
, you can take action when the part of the page where you clicked the search button gets focus (again).
Maybe if you assign the session vars you collected in your popup into the "fields" of the main screen when
that part gets focus, you will get further.
I could not find the focus part in the template settings but I know there is a routine somewhere in the source.
I have not experimented with this so I am merely guessing here.
Hope it helps a bit.
Ren
-
Rene,
Thanks, I'm still trying to get the secondary filter form work. For now, I have used the placeholder feature and modified the filter fields by removing the prompts. Now it looks better, see the attached image. I'll continue to work on the secondary form.
Jeff
-
Bruce,
I still struggle with this secondary filter form. I'm not sure if I need to use session variables, since the forms, in a NT app, use these. Or am I supposed to be using JS code to set the variable on the main form to the value of the variable on the secondary form. I have tried both ways and have had no success.
Thanks,
Jeff
-
send me the updated example Jeff so I can see what you are doing.
Cheers
Bruce
-
Bruce,
Sent you the updated version.
Thanks!
Jeff