NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: ccordes on June 15, 2012, 04:30:14 PM

Title: Browse in Form filter problem
Post by: ccordes on June 15, 2012, 04:30:14 PM
Hi
I have a browse in a memory form that has a radio buttons to set a filter.
This browse is also used elsewhere without the form and works.

My question is about the filter I'm using. The ord:status field is a long. It holds the status of the order.
The browse uses this filter
-    'inlist(ord:status,'&p_web.gsv('ReqStatus')&')'
, where ReqStatus is the requested status or a list of related statuses. So it could be '7' or it could be '7,9,24'
Outside of the form this works fine.
Inside the form it only works if the filter is 'ord:status='&p_web.gsv('ReqStatus')
The Form Radio field is called ReqStatus string(10) to allow for multiple statuses if needed.
ord:status is in the hotfields.
I have the "Child of" filter first in the list of conditional filters.

In debugview I can see the view filter property being set
[8188] [netTrace][thread=3] (1216491978:3)_Filter: inlist(ord:status,7) - In the form doesn't work.
and
[8188] [netTrace][thread=3] (1216491978:3)_Filter: inlist(Ord:Status,8,7,9,24) - Outside the form does work.
and
[8392] [netTrace][thread=3] (179983165:3)_Filter: ord:status=7 - Inside the form, does work.



Any suggestion as to why this might be happening or what I could try next?

Thanks much,
chris C
Title: Re: Browse in Form filter problem
Post by: Bruce on June 17, 2012, 09:25:44 PM
is ord:status a string, or a number field?

however if I had to guess, I'd say maybe ord:status was not bound in the case where it doesn't work. Try binding it manually just for a test.

bind('ord:status',ord:status)

cheers
Bruce
Title: Re: Browse in Form filter problem
Post by: ccordes on June 18, 2012, 06:56:37 AM
ord:status is a long.

pretty sure it is bound by adding to the hot fields list, but I will check that.
Does it need to be bound in the form as well?
Title: Re: Browse in Form filter problem
Post by: Bruce on June 18, 2012, 10:00:05 PM
I would expect it to be bound as well - but if you do it manually at least that takes that possibility off the table.

Incidentally, I'm not 100% sure about using INLIST in a filter - I've not done that before either, although as it works in some cases (in your report) it would _appear_ to be ok.
Title: Re: Browse in Form filter problem
Post by: ccordes on June 19, 2012, 07:22:34 AM
Boy, I HOPE it works; I use inlist a lot in filters rather than a string of ORs.

- Just on the CWTalk - Mark suggests that inlist uses strings as the list not longs. so inlist(ord:stat,'1','2','3') not inlist(ord:stat,1,2,3)

I'll try it.