Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5542 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi --

I have adopted a technique for "boolean fields". It entails the following ... make the field a Number (that can accept nulls) ... create a value list that has a single value of "1" (I usually call the Value List a Switch) ... and use the checkbox as the display type in layouts. I am sure you have all done and seen it.

My question is how can you make the negative (null) value easily "queryable thru Find" on a ListView (for users)?

--Rich

Posted

Lots of possibilities, but remember that finding "==" in a field will find when it is empty.

My favourite might be to make the field in to a BUTTON, which calls a generic script that can be used for any switch field:




# script parameter = field name



if [ get(windowmode) = 0 ]    //browse mode



go to field ( get(scriptparameter) )



else if [ get(windowmode) = 1 ]  //find mode



display dialog "Find positives, negatives, or all?"



if get(lastmessagechoice)=1 //all

    set field by name ( get(scriptparameter) ) to ""

else if get(lastmessagechoice)=2 //positives

    set field by name ( get(scriptparameter) ) to "1"

else if get(lastmessagechoice)=3 //negatives

    set field by name ( get(scriptparameter) ) to "=="

end if



Or something along those lines.

Hope that helps. Have subscribed to this topic as I'd be interested to hear other ideas.

James

This topic is 5542 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.