NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: DonRidley on October 07, 2011, 08:17:00 AM

Title: How to use INSTRING in a filter?
Post by: DonRidley on October 07, 2011, 08:17:00 AM
Hello,

I want to use INSTRING in a filter.  I have a local variable being used for entering search data.  I want the text entered in that field to be searched for in a field in my browse.

Here's part of what I;ve been trying:

(Instring(upper(p_web.GSV(<39>LOC:Owner<39>)),upper(p_web.GSV(<39>PER:Owner<39>)),1,1) > 0

LOC:Owner is the search field.  PER:Owner is the field being searched.  I do not want to use a standard locator.  I want the user to be able to enter data and click a search button.

Perhaps INSTRING is not the best way.

Any suggestions appreciated,

Don

NetTalk 5.37
TPS
Title: Re: How to use INSTRING as a filter?
Post by: DonRidley on October 07, 2011, 01:40:22 PM
I basically want to duplicate the effect of entering data in a locator field but with my own entry control and such...if possible.

Don
Title: Re: How to use INSTRING in a filter?
Post by: DonRidley on October 08, 2011, 08:11:04 PM
Can INSTRING be used this way?
Title: Re: How to use INSTRING in a filter?
Post by: kevin plummer on October 09, 2011, 02:45:33 AM
Try something like...

loc:FilterWas = 'Instring(<39>' & Clip(Loc:UserLogin) & '<39>,POMT:Approved,1,1) > 0'
Title: Re: How to use INSTRING in a filter?
Post by: DonRidley on October 09, 2011, 04:52:40 AM
Hey Kevin,

Yours didn't work but it did get me pointed int he right direction.

Here's what did work...

' Instring(<39>' & Clip(p_web.GSV('Loc:Owner')) & '<39>,PER:Owner,1,1) > 0'

THANK YOU!!!!!!

Don
Title: Re: How to use INSTRING in a filter?
Post by: kevin plummer on October 09, 2011, 04:24:23 PM
Well it works if the local variable is primed with the GSV but I thought you would work that out for yourself... BTW you don't need to clip GSV's as they are returned clipped.
Title: Re: How to use INSTRING in a filter?
Post by: DonRidley on October 09, 2011, 04:37:40 PM
Ah.. a GSV automatically clips.. didn't know that.

Thanks Kevin!!
Title: Re: How to use INSTRING in a filter?
Post by: Bruce on October 09, 2011, 11:18:56 PM
all p_web methods that return a string, return a clipped string.

cheers
Bruce
Title: Re: How to use INSTRING in a filter?
Post by: DonRidley on October 10, 2011, 02:21:38 AM
Awesome!  Thanks guys!   I have been away from NetTalk for too long!

Don