I must be missing something. How can I use indirection with the Count ( ) function?
In the Data Viewer I have tested various expressions to figure out what is going on:
x = GetFieldName ( syn_inv_MEDIA::id ) ;
//Count ( x ) // = ? with message "The specified field cannot be found." ( this is the problem )
//GetField ( x ) // = 12063508651157000000006642000166351230610
// GetFieldName ( Evaluate ( x ) ) // = syn_inv_MEDIA::id
// x = "syn_inv_MEDIA::id" // = TRUE
x = GetFieldName ( syn_inv_MEDIA::id ) // = TRUE
What is hard to understand is that GetField ( x ) works as it should, but Count ( x ) does not. And that x = "syn_inv_MEDIA" is also true does not make sense.
FileMaker function reference for Count () says this about the Parameters :
field - any , , or set of non-repeating ; or an, repeating field, or set of non-repeating fields. that returns a field
So is there anyone that is seeing what I am not and knows how to use indirection for a field in the Count () function?
My script knows the field that needs to be counted with the variable set, but each time the script loops through the next table the field table name will change. I will always be counting fieldname "id", the table will be different on each loop.
Any help is very much appreciated.