NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: charl99 on November 13, 2012, 04:05:25 AM
-
Hi Bruce,
I noticed it before, but forgot about it. There appears to a bug in the above in the Read Only IF: Condition
inlist(p_web.gsv('OQ:OptionType')=1,4,8) only work for the first item, ie 1.
whereas
p_web.gsv('OQ:OptionType')=1 or p_web.gsv('OQ:OptionType')=4 or p_web.gsv('OQ:OptionType')=8
works.
Thanks
Charl
PS. I did not bother to make an example as this is straightforward.
-
Hi Charl,
I think your syntax is wrong. Try
inlist(p_web.gsv('OQ:OptionType'),1,4,8)
-
Nope, that was a typo. It definitely acts as I described. I checked again :)
Thanks
-
then I guess you'll need to make an example (tweak one of the shipping ones).
'cause when I tried here it seemed to work ok - so I'm missing some part of the equation.
cheers
Bruce
-
Yes, I think I forgot to add it happens on a _Button_.
Sorry for that.
I added a YesNo field to the web1 example Mailboxes file, and added it as a button to the form with Read Only If condition:
inlist(p_web.gsv('MAI:SizeLimit'),1,4,8)
You'll notice when size limit is 1 it is Read Only, when Size limit is 4 or 8 it is not.
Cheers
Charl
[attachment deleted by admin]
-
this is one of those cases when
"What goes without saying"
goes better with saying.
ie be more explicit in your test.
inlist(p_web.gsv('MAI:SizeLimit'),1,4,8) > 0
is better than just
inlist(p_web.gsv('MAI:SizeLimit'),1,4,8)
Because ultimately this condition is placed in a CHOOSE statement, and Choose has 2 forms, and because InList returns a number it uses the wrong form.
cheers
Bruce