This is a public Forum  publicRSS

Forum post

    Amanda Burch
    Script to Reset Filter Results in Portal
    Forum post posted February 28, 2012 by Amanda Burch
    61 Views, 2 Comments
    Title:
    Script to Reset Filter Results in Portal
    Post:

    Two tables - Employee Scheduling and Projects. I have a portal on Employee Scheduling displaying individual line items--or Projects--via a Employee ID relationship. I have a filter set up to restrict portal results by selecting a Month with a script to refresh window when a month is selected from the global field... Everything works just fine, but I would like to be able to "clear" the filter and view all months on demand. Help!

    Answer

     

    • PhilModJunk
      posted February 28, 2012 by PhilModJunk  Permalink

      A filter expression such as:

      IsEmpty ( EmployeeScheduling::globalMonthField ) or ( EmployeeScheduling::globalMonthField = PortalTable::month )

      would show all related records if Monthfield is cleared.

      And it's possible to structure your portal's relationship so that no refresh script is needed to get the portal to update when the value in the global field is changed.

      EmployeeScheduling::EmployeeID = Projects::EmployeeID AND
      EmployeeScheduling::globalMonthField X Projects::anyfield

    • Amanda Burch
      posted February 28, 2012 by Amanda Burch  Permalink

      Fantastic. Thanks!!