Jump to content
Server Maintenance This Week. ×

Need a calc field to.. count # fields same record are blank?


RodM

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

Recommended Posts

Hope this is Left brain stuff..

 

I have a single record, there are 5 global field1, field2 field3 etc

I need  a calc global field, to show how many are empty of those filled in

 

Can't figure..

TIA

R

Link to comment
Share on other sites

to show how many are empty of those filled in

 

Not sure I understand this last sentence; I assume you want to count the number of empty globals:

Sum
( 
  IsEmpty ( globalField1 ) ;
  IsEmpty ( globalField2 ) ; 
  IsEmpty ( globalField3 ) ; 
  IsEmpty ( globalField4 ) ; 
  IsEmpty ( globalField5 )
)
  • Like 1
Link to comment
Share on other sites

I was thinking that Rod was looking for a way to know which fields were empty.

 

 

Case ( IsEmpty ( globalField1 ) ; "globalField1" & ", " ; "" ) &
Case ( IsEmpty ( globalField2 ) ; "globalField2" & ", " ; "" ) &
Case ( IsEmpty ( globalField3 ) ; "globalField3" & ", " ; "" ) &
Case ( IsEmpty ( globalField4 ) ; "globalField4" & ", " ; "" ) &
Case ( IsEmpty ( globalField5 ) ; "globalField5" & ", " ; "" )
Link to comment
Share on other sites

Rod said, "...to show how many are empty of those filled in"

 

Count ( field1 ; field2 ; field3 ; field4 ; field5 ) will count how many have any value so if you have 5 fields are want to know how many are empty, it could be:

 

5 - Count ( field1 ; field2 ; field3 ; field4 ; field5 )

 

Don't ya just love how there are so many approaches with FileMaker?  Take your pick, Rod!!   :laugh2: 

Link to comment
Share on other sites

Thanks you all...

 

I liked this one

 

Sum
( 
 
IsEmpty ( globalField1 ) ;
  IsEmpty ( globalField2 ) ; 
 
IsEmpty ( globalField3 ) ; 
 
IsEmpty ( globalField4 ) ; 
 
IsEmpty ( globalField5 )
)

 

I might allow 5 agents to log in..

As agents log in, I populate one of the GlobalFields with their persistent_ID  ( is that long not used for anything id)...

I think this calc field now, will let me have a count of still avail agents or if all are agents log out, maybe run another admin routine.

Link to comment
Share on other sites

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