July 20, 201015 yr 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,
July 20, 201015 yr 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.
July 20, 201015 yr 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)
July 20, 201015 yr Count(Companies-JoinCP-People:__PeopleID) is not a valid expression either: the table name contains a hyphen.
Create an account or sign in to comment