NetTalk Central

Author Topic: File Dropdown -Fields-More Settings-Extra Possibilities(not in file)  (Read 9394 times)

Duke

  • Newbie
  • *
  • Posts: 3
    • View Profile
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

John Hickey

  • Administrator
  • Newbie
  • *****
  • Posts: 47
    • View Profile
    • Email
Re: File Dropdown -Fields-More Settings-Extra Possibilities(not in file)
« Reply #1 on: June 19, 2007, 12:45:46 PM »
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?

Duke

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: File Dropdown -Fields-More Settings-Extra Possibilities(not in file)
« Reply #2 on: June 19, 2007, 02:14:40 PM »
Thanks John.  That did it.  If Bruce is watching maybe this is something he can fix.

John Hickey

  • Administrator
  • Newbie
  • *****
  • Posts: 47
    • View Profile
    • Email
Re: File Dropdown -Fields-More Settings-Extra Possibilities(not in file)
« Reply #3 on: June 19, 2007, 02:48:46 PM »
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.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: File Dropdown -Fields-More Settings-Extra Possibilities(not in file)
« Reply #4 on: June 19, 2007, 11:32:47 PM »
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

Duke

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: File Dropdown -Fields-More Settings-Extra Possibilities(not in file)
« Reply #5 on: June 20, 2007, 07:38:41 AM »
Hi Bruce,  Yes, In my case the text was set to '-- please select --' and the value was set to ''.

Gerald

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: File Dropdown -Fields-More Settings-Extra Possibilities(not in file)
« Reply #6 on: June 20, 2007, 07:57:29 AM »
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

Bram Klootwijk

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • Email
Re: File Dropdown -Fields-More Settings-Extra Possibilities(not in file)
« Reply #7 on: July 06, 2007, 11:48:29 AM »
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