2 Replies Latest reply on May 29, 2012 3:51 PM by IanLenehan

    Can not filter my portal using a calculation (number) field



      Can not filter my portal using a calculation (number) field



      I have a FM Pro 12 database where I am trying to filter a portal by a calculated field, however it doesn't seem to be working. The calculated field is calculating the difference between two numbers, and when I put the result into the portal, is displayed as I would expect it to.

      The calculation for this field (Depot_PORTAL DATA::Total Outstanding) is: Total Outstanding - Count (Portal Completed::Barcode Up). It is also set to display as a number, which it does.

      The filter I have applied to the portal is Depot_PORTAL DATA::Total Outstanding > "0". I have also tried Depot_PORTAL DATA::Total Outstanding > 0

      However my portal does not exclude results with 0 in this calculated field.

      Any suggestions as to what I may be doing wrong would be greatly appreciated. I did search the forum for a similar issue but couldn't find anything.

      Many Thanks


        • 1. Re: Can not filter my portal using a calculation (number) field

          Count is an aggregate function counting related records and the calculation where you have used it appears to be defined as a recursive calculation as it refers to itself by name in the same expression. Is this correct? What is the relationship between Depot_portal Data and Portal Completed?

          If you put Depot_portal Data::Total Outstanding in your portal, what value do you see in each portal row? Are all the values greater than 0?

          What relationship did you define for the portal? What field matches to what field and with what operator? (=. X . > ...) The relationship for your portal will use the relationship linking the table occurrence (box found in Manage | database | relationships ) selected in "show records from" in layout setup with the table occurrence selected in "Show Related Records From" in portal setup... Any filter expression that you define will then omit any related records where the expression does not evaluate as true for that related record.

          • 2. Re: Can not filter my portal using a calculation (number) field

            Hi PhilModJunk - thank you for your response. I've just realised that I was filtering buy the wrong field...a little dumb. But it was your questions that prompted me to look a bit more closely!