sandyinlet Posted July 20, 2010 Posted July 20, 2010 The TO "Companies-JoinCP-People" manages a many-to-many relationship. Setting the Data Viewer to: Count (Companies-JoinCP-People) returns an accurate count no matter what record I jump to. However, when used in an If statement it does not. If(count(Companies-JoinCP-People) = 1 skips, does not enter the If statement when it should. Exactly the same thing happens if I create an unstored calc field with the formula "count(Companies-JoinCP-People)". It displays accurately in the Data Viewer but doesn't function properly in a scripted If statement. This is in FMP11. What am I misunderstanding? Kind regards,
comment Posted July 20, 2010 Posted July 20, 2010 You are probably in the wrong context when your script gets to it. It's hard to say for sure, since Count (Companies-JoinCP-People) is not a valid expression in any case.
bruceR Posted July 20, 2010 Posted July 20, 2010 The TO "Companies-JoinCP-People" manages a many-to-many relationship. Setting the Data Viewer to: Count (Companies-JoinCP-People) returns an accurate count no matter what record I jump to. However, when used in an If statement it does not. If(count(Companies-JoinCP-People) = 1 skips, does not enter the If statement when it should. Exactly the same thing happens if I create an unstored calc field with the formula "count(Companies-JoinCP-People)". It displays accurately in the Data Viewer but doesn't function properly in a scripted If statement. This is in FMP11. What am I misunderstanding? Kind regards, It is unclear what you're doing. The calc you describe is not complete, so of course it won't be accepted. If(count(Companies-JoinCP-People) = 1 ; trueValue; falseValue)
sandyinlet Posted July 20, 2010 Author Posted July 20, 2010 Bruce, you're right. Should be count(Companies-JoinCP-People:__PeopleID)
comment Posted July 20, 2010 Posted July 20, 2010 Count(Companies-JoinCP-People:__PeopleID) is not a valid expression either: the table name contains a hyphen.
Recommended Posts
This topic is 5240 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 accountSign in
Already have an account? Sign in here.
Sign In Now