NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Duke on June 19, 2007, 11:21:13 AM
-
I have added '-- Please Select --' to before file records expecting this to appear in the drop down before it is selected. Am I missing something?
Thanks
Gerald Duke
-
I noticed the same thing, I have a department filter and I want the first selection to be "All Departments" (basically, no filter). When the page loads, it was showing the first department instead of "All Departments" (even though "All Departments" is first in the list).
There is an embed "Start of "Option Filter & Order"" right before it loops through the Departments table and adds records to the drop list. I added this line of code there:
p_web.setsessionvalue('DPT:Description','All Departments')
and now it properly selects the first item in the list. Maybe something similar will work for you?
-
Thanks John. That did it. If Bruce is watching maybe this is something he can fix.
-
I did make one tweak:
IF p_web.getsessionvalue('DPT:Description') = ''
p_web.setsessionvalue('DPT:Description','All Departments')
END
That way if the value was already set to something else (I selected it to use as a filter) it would keep that value.
-
Gerald / John -
Did you set a _value_ for that drop down option? Usually
0
or
''
(depending on the type)
If you leave that out then possibly it would have an effect.
Also the "current value" is highlighted when you open the form. So if you were changing a record, then the department highlighted would belong to the department that person is assigned to. Which is why setting the value to zero makes it work.
Cheers
Bruce
-
Hi Bruce, Yes, In my case the text was set to '-- please select --' and the value was set to ''.
Gerald
-
Hi Gerald,
Check out example 31
Update Customers procedure.
There are 2 drop down's there which should be doing what you're looking for.
The thing you are dropping down, is the unique identifier a string, or a numeric?
If a numeric then it should be 0, not ''.
I'll test here using a string and see if that's the issue.
Cheers
Bruce
-
Hi Bruce,
same out here. I'm using a string and am setting the field value to 'Alles'.
When displaying, it skips this (first) entry and begins with the second one.
Cheers,
Bram