AnsweredAssumed Answered

[Beginner] Filter portal expression

Question asked by DoruChiulan on Aug 6, 2014
Latest reply on Aug 7, 2014 by philmodjunk


[Beginner] Filter portal expression


     Hello all, newbie here!

     I am trying to do a simple solution so I can learn FileMaker. The solution consists in having a database where I can keep Football Matches between teams. Besides Matches and Teams, I also have a Users table. From users context I want to display all kind of information. Like played matches, matches won etc.

     After I succeeded with played matches, I wanted to apply a filter so I can see just the won matches.

     You can see my table relationships in the attached picture.

     The problem is that my expression doesn't work.

     Full expression :

     If ( ((User_Match::_homeUserId = User::__userIdPk)  and  (User_Match::home_goals > User_Match::away_goals))  or ((User_Match::_awayUserId = User::__userIdPk)  and  (User_Match::away_goals > User_Match::home_goals)) ; 1 ; 0)

     Simple test expression

     If (User_Match::_homeUserId = User::__userIdPk ; 1 ; 0)

     None of these works. I suppose I am wrong regarding the "User::__userIdPk" ? I want to use the current record userIdPk. Isn't this the correct way to do that ? What would be the correct approach?