October 29, 20196 yr Hi there, I am sure there is a really simple answer to this but I just can't crack it. I have two related tables: Property and AoPC. Each Property will belong in a particular AoPC. I have set up the relationship and a set of tabs on a layout in the AoPC table. Each tab has a portal showing particular properties in that AoPC depending on the value in another field in the Property table called Influence. The Portal Filter calculation is really simple: If(Property::Influence = "25m";"25m";""), with a different value for each portal. There are three possible values in the Influence field: 25m, 40m or GWD. For 25m and 40m, this works perfectly. Also if the portal is unfiltered, all records for that AoPC show up. However, when I filter the portal for any value without a numeral in it, eg GWD, nothing shows up on the portal. I tested this by changing the value to 1GWD and GDW1 and viola, it showed up in both cases, but remove the 1 and it won't show. Influence field is text, I have checked for spaces etc, but nothing changed. Thank you 😣
October 29, 20196 yr A portal-filtering expression is evaluated to a Boolean value: if the result is True, the record is shown; otherwise it's filtered out. In your first example, the result is "25m" - and GetAsBoolean ( "25m" ) returns True, because GetAsNumber ( "25m") returns 25 and any number other than 0 evaluates as True. Conversely, the string "GWD" evaluates to False, because it contains no non-zero digits. Your filtering expressions should be modified to return a Boolean value directly - that is; Property::Influence = "25m" for the first example, and: Property::Influence = "GWD" for the other. This will return 1 (True) when the equality is satisfied, 0 (False) otherwise. Note also that you could use a single portal filtered by: Property::Influence = AoPC::gInfluence and have it show only records matching the value selected in the global gInfluence field (a refresh may be required upon change). Edited October 29, 20196 yr by comment
October 31, 20196 yr Author Ahhh, I see now. Thank you so much for a concise explanation. That makes sense and I was able to fix my issue. 😊
Create an account or sign in to comment