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

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

Recommended Posts

Posted

I'm ready to pull the trigger, just don't know which ones!

 

I have a text field with a value list of the following checkbox'd choices: All   Average   Count   Std Dev   Total

 

I want it so when a user ticks All it nulls the other values (clears the field, save for All), but if a user changes his mind and wants to use any of the other value(s), when they click the other value(s) I want All to be untucked/cleared.

 

It sounds simple enough--and it probably is--just that I'm having trouble wrapping my head around which script trigger to use for when; when I use OnObjectModify and PatternCount to test for "All", I can get it to work so when ticking All it clears the field, but I'm running into trouble with the second half to he problem.

 

TIA for your help!

Posted

For the second half, try

If [ValueCount ( YourTable::checkbox ) >1 and ValueCount ( FilterValues (YourTable::checkbox ; "All" ))]
     Set Field [YourTable::checkbox; Substitute( YourTable::checkbox; FilterValues ( YourTable::checkbox ; "All" ); "")]
End If
Posted

I want it so when a user ticks All it nulls the other values (clears the field, save for All), but if a user changes his mind and wants to use any of the other value(s), when they click the other value(s) I want All to be untucked/cleared.

 

Try this auto-enter calc:

Let ( [
  allTypes = "Average¶Count¶Std Dev¶Total" ;
  typesIn = FilterValues ( Self ; allTypes )
  ] ;
  Case (
    RightValues ( Self ; 1 ) = "All¶" or ValueCount ( typesIn ) = ValueCount ( allTypes ) ;
    "All" ;
    typesIn
  )
)
Posted

Thanks for elegant solutions, guys! Both worked like a charm so I'll pick one and go with it.

 

Why not use Radio Buttons instead of checkbox?

 

Good question! I'm creating a switchboard for report and list generation so I want users to be able to pick which elements they want to include in reports that require calculation, so some may be interested in having an average and count, but nothing else; others, all; others, totals and standard deviations, and so on. 

This topic is 3699 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.