rbickings

Count Function with Global Field

Discussion created by rbickings on Mar 4, 2017
Latest reply on Mar 5, 2017 by philmodjunk

Good evening everyone,

I have a church client for which i have been developing an FMP database and in which they desire a rather intricate attendance module.  This is not just keeping attendance, but reports with details like, how many parishioners have attended only 3 times in the past six months, and so on.  In order to develop this I've had to search for the fields used in a date range and count how many "X"'s are in each set of fields for each parishioner.

 

So far I've been able to grab these field names from the date range and put them into a global field, using the GetFieldName Function, along with the Evaluate function and a calculation that produces the correct Table::Field name.  The problem is that when I use the Count function with that global field, it doesn't work.  For instance:

 

Count ( gAttendanceHoldFields)  //which contains two table::Field names: Attendance Year 2017::_1_1_2017; Attendance Year 2017::_1_8_2017.

The answer always comes back 1 for every parishioner.

 

However, if I hard code it: Count ( Attendance Year 2017::_1_1_2017; Attendance Year 2017::_1_8_2017), I get the correct varied attendance values unique for each parishioner.

 

Does anyone have any idea?  The global field contents and the hard code contents look exactly the same???

 

Thank you,

Rbickings

Outcomes