Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

All this field's negativity...maybe that's why I'm having a problem coding a calc for it.

 

I have a text box warning field I want to use to alert a user that if the PrintChoice field contains either the phrases "Last Visited" or "Status" and the radio-button'd SortChoice field doesn't have either the Ascending or Descending button chosen, it'll "light up".

 

Where I'm having a problem is parsing the PrintChoice field. I tried using:

 

PatternCount ( PrintChoice ; "LastVisited" ) = 0  or PatternCount ( PrintChoice ; "Status" ) = 0

 

...with...

 

IsEmpty ( SortChoice )

 

...but the calc started getting clunky fast from there, logic-wise. Surely (don't say it!), there's an elegant way to code this request.

 

I guess being a poor, starving database coder, I belong to the world of have nots.

Posted

Is PrintChoice a checkbox field? Doesn't sound like it. So why not simply test for =

PrintChoice = "LastVisited" or PrintChoice = "Status"

Alternatively, use =

not IsEmpty ( FilterValues ( "LastVisited¶Status" ; PrintChoice ) )

This will return true if the field contains either of the values - so this will work in case the field is a checkbox.

 

 

I am also not sure why you allow SortChoice to be empty (or, alternatively, why don't you make Ascending the default choice and only require user entry to override it).

Posted

Thanks, Comment, and you too, Wim.

 

Correct, it's not a checkbox'd field.

 

The question of sorting is a good one, Comment, and I'd appreciate your input (as always!) on this:

 

What's "best practice" when it comes to sorting? Normally, whenever a field is alpabetic, I hard-code an ascending order in lists and reports since that's how we normally want to see things. However, it gets a little dicey when it comes to dates since some people prefer ascending order and others descending order. (In my experience, Accounting types prefer decending order.) I don't know if it's good practice to set a default sort order for dates since I don't want to annoy users who prefer one over the other, so that's why I left it unchosen. Your thoughts?

 

As for the Status field above, that's a gray area since there are three choices for it: Active, Inactive, and Undecided. Should I hard-code that in ascending order as well as the other "alphabetics" or leave it empty for a user to choose whether s/he wants to see Undecided records, first?

Posted

From a data perspective, sort order is a Boolean. You cannot perform a sort if the sort order is empty or "unknown" or "undecided" or "a little bit of both". The natural container for this type of data is a Number field where 0 (or empty) represents the default choice and 1 (or any other non-zero number) represents an override.

 

On top of that, you have the user-interface to consider. It's more difficult to advise about that, knowing so little. There are some established conventions, however, that you could consider - such as clicking the header to reverse the sort order (with an icon indicating the current choice), or a pop-up menu.  But even if you decide to go with your current choice of radio buttons, you shouldn't allow the field to be empty.  IMHO, making "Ascending" the default choice is acceptable (and the user who prefers "Descending" has the same amount of clicks to make as they do now). But if it's such a big issue, you could make this a part of user preferences.

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