NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Gregg Matteson on July 05, 2007, 10:26:48 AM
-
I am trying to prime a DISPLAY field on a form with a session variable. As part of testing I placed the variable on the static page using the format <!-- Net:s:sessClico --> and it shows the value as I expect it would.
I can't prime the field with anything , for example I primed it ...
cli:client = 'test' and that doesn't even show.
ANY suggestions are much appreciated.
-
Ok. Finally got it to prime the field. Now to get it to display during the insert.
-
Greg,
Not sure if you're still asking a question or not?
To manually set a session value you use:
p_web.setSessionValue('sessClico',value)
Alan
-
Alan,
I got it to prime the field but I would like it to be visible in the display field during an insert .
I am using the session variable from the login procedure and that same variable is working to prime another field in another procedure. Can't understand why it doesn't work in this procedure even though everything is set up the same. I'm missing something.
Thanks,
Gregg
-
Greg,
To understand what is happening, right click on the procedure, and choose Source.
now search for
Value::fieldname
(where fieldname is the name of your display field)
there you can see how your field is bing used, and hence what you should set to get it to display.
(Typically it'll be the SessionValue)
Cheers
Bruce
-
I'm having the same issue.
A form with a record in insert mode and I can't get the primed values to display.
For example I've primed a checkbox field with a value of 1 and it is not checked when the form is first displayed.
I've tried
- setting 1 as the initial value in the dictionary
- priming the field with 1 on the advanced tab
- using SetValue() and SetSessionValue() individually and together, in the StoreMem routine
What have I missed?
TIA
-
Hi Rhys,
Is this form on a "File" or on "Memory"?
If "File" is the field you're trying to prime a file field, or a local variable?
Cheers
Bruce
-
Hi Bruce,
It's a file, and it's the primary file for the form. However I have other other files with entry fields on the same form, and I can't prime them either, using any of the methods below.
Cheers
Rhys
-
Hi Rhys,
Are you calling the form from a browse?
Can you right-click on the procedure, choose "source", search for the PreInsert routine, and cut & paste the code from that routine here? You should see the field priming there, but I'd like to see the actual code.
Cheers
Bruce
-
Hi Bruce,
The form's not being called from a browse. Does that explain things? However, it's always in Insert mode (it's used to let someone set themselves up as a new user).
PreInsert code as requested:
p_web.SetSessionValue('NewSystemUserPage_CurrentAction',InsertRecord)
p_web.setsessionvalue('showtab_NewSystemUserPage',0)
Com:CreatorSuID = 7
Com:Publish = 1
SU:CountryID = 1
Com:TimeZoneID = 1
! Start of "Pre Insert After Primes"
! [Priority 5000]
Com:CompanyCode = 'US'
CR:SuCode = 'US'
SU:CountryID = 1 ! Australia
Com:CreatorSuID = 7 ! update to SystemUserID later
! End of "Pre Insert After Primes"
p_web.FileToSessionQueue(Companies,Net:AlsoValueQueue)
Cheers
Rhys
-
>> However, it's always in Insert mode
It sounds to me like it's not being put into insert mode correctly.
How are you doing it?
What does the URL look like?
FAQ #4 discusses the correct URL for an Insert.
Cheers
Bruce