AnsweredAssumed Answered

PatternCount mirroring

Question asked by ponderosa on Jan 24, 2018
Latest reply on Jan 25, 2018 by ponderosa

I have two fields (Type and VerbiageLocation) that if the item is being shipped to a specific destination (Destination field) input from the Type is supposed to be mirrored in the VerbiageLocation field. Both fields are checkbox fields and so I tried using a PatternCount. "Meat" is required in all scenarios (I swapped out the real field names, sorry.)

 

This is the AutoCalc in the text field VerbiageLocation:

 

Case (

Destination = "TX" and PatternCount ( Type ; "Fruit" ) ; "Meat¶Fruit" ;

Destination = "TX" and PatternCount ( Type ; "Veggie" ) ; "Meat¶Veggie" ;

Destination = "TX" and PatternCount ( Type ; "Grain" ) ; "Meat¶Grain" ;

Destination = "TX" and PatternCount ( Type ; "Dairy" ) ; "Meat¶Dairy" ;

 

Destination = "TX" and PatternCount ( Type ; "Fruit" ) and PatternCount ( Type ; "Veggie" ) ; "Meat¶Fruit¶Veggie" ;

Destination = "TX" and PatternCount ( Type ; "Fruit" ) and PatternCount ( Type ; "Grain" ) ; "Meat¶Fruit¶Grain" ;

Destination = "TX" and PatternCount ( Type ; "Fruit" ) and PatternCount ( Type ; "Dairy" ) ; "Meat¶Fruit¶¶Dairy" ;

1 )

 

This only works for the top four cases, and I suspect the problem is how I'm asking Filemaker to determine the PatternCount if there's more than one to find, but I am limited in my knowledge as to how to remedy this.

Outcomes