NetTalk Central

Author Topic: Filter on File Drop  (Read 5719 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
    • Email
Filter on File Drop
« on: April 04, 2019, 12:13:24 AM »
Hi,
On a form, I have a file drop on Department Name (Dep:Name)
Each record in the Department table has a ZoneNumber (Dep:Zone)

Each Employee has a zone Number (EMP:ZoneNumber)

I want the file drop to display only those Departments that have the same zone number as the employee's zone  last logged in

The filter doesnt like the = in the expression Im trying to set and besides, the Dep:Zone hasnt been called...?

How to please?

Many thanks
Richard
NT 11.07


DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Filter on File Drop
« Reply #1 on: April 04, 2019, 02:32:57 PM »
Assuming Strings...
'Dep:Zone = ' & '''' & p_web.GSV('StoredEmployeeZone') & ''''

or maybe even...
'UPPER(CLIP(Dep:Zone)) = ' & '''' & UPPER(p_web.GSV('StoredEmployeeZone')) & ''''  !No need to clip the Session Value

Assuming Longs...
'Dep:Zone = ' & p_web.GSV('StoredEmployeeZone')

Where StoredEmployeeZone = Session value stored when user logs in.

There are better ways to construct the string filter but it works for me.

The NetTalk drop downs use Views.  Make sure Dep:Zone is in the View.

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Richard I

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
    • Email
Re: Filter on File Drop
« Reply #2 on: April 04, 2019, 03:31:45 PM »
Many thanks Don, again !!
much obliged.
Works perfectly.
So simple but so far!

Cheers
Richard

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11252
    • View Profile
Re: Filter on File Drop
« Reply #3 on: April 04, 2019, 10:14:43 PM »
Hi Don,

Good answer - just one thought;

>> The NetTalk drop downs use Views.  Make sure Dep:Zone is in the View.

Fields used in _Filters_ do not need to be PROKECTED in the VIEW. While that's a fairly common Clarion myth it has no basis in fact.

cheers
Bruce



DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Filter on File Drop
« Reply #4 on: April 05, 2019, 01:43:18 AM »
Hi Don,

Good answer - just one thought;

>> The NetTalk drop downs use Views.  Make sure Dep:Zone is in the View.

Fields used in _Filters_ do not need to be PROKECTED in the VIEW. While that's a fairly common Clarion myth it has no basis in fact.

cheers
Bruce

Thanks for the reminder Bruce!  Just keeping you on your toes!  LOL
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11