AnsweredAssumed Answered

More Counting Quesitons

Question asked by niponki on May 20, 2010
Latest reply on May 21, 2010 by philmodjunk

Title

More Counting Quesitons

Post

Ok, back again with another question.  :smileyhappy:

 

Version: File Maker Pro 6

Platform: Windows XP

Me: Fairly new, but have built a few things and know my way around the basics

 

Background

I have a relational database that I have created and it is filled.  What I want to do now is have a layout within the parent file that summarizes all the data respective to my database.  This layout will have the the number of instances or occurances certain text has been chosen from various drop down menus within the database.  In addition, I would like to have one field that contains a drop down menu on the summary layout.  This drop down menu will have catagories that the user might want to have summarized.  For example, when the user clicks on the drop down menu field, he/she will get the following catagories:

Catagory 1

Catagory 2

Catagory 3

If he/she selects "Catagory 3," then the number of instances that catagory 3 has been chosen within the database will be displayed.   

 

Solution

Basically, I want to know if this is possible, and if it is, what would be the proper syntax, because I can't seem to get it working.  Here is the logic that I came up with to run this.

 

if (relationship::relatedfield1)

then count(relatedfield1)

else if (relationship::relatedfield2)

then count(relatedfield2)

end if

 

That is a truncated version of the logic, for there are many more "if's" to be had there, but I left at that just for simplicity. 

 

Thanks for the help!

Outcomes