3 Replies Latest reply on Nov 28, 2013 6:16 AM by philmodjunk

    Portal filter script

    feait

      Title

      Portal filter script

      Post

           Hi

           I have a portal to another table in my file. I want it to filter the results by a partial search match.

           If the "room number" of the entry appears within the "adjoining rooms" field of the related table I want the entries to be displayed in the portal.

           The script I currently have set is:

           PatternCount ( Door Schedule::Adjoining Rooms ; Room Data Sheets::ROOM NO ) > 0

           This is working when the adjoining rooms has the room no within it exactly with no spaces and with each entry on a new line

           Eg.:

           G-01

           G-02

            

           I want to ensure it works if it's entered with a space rather than a return

           Eg.:

           G-01 G-02

            

           Any ideas?

            

           Thanks

           Ivan

        • 1. Re: Portal filter script
          philmcgeehan

               Could you try to substitute the space for a carriage return

                
          PatternCount ( Door Schedule::Adjoining Rooms ; Substitute ( Room Data Sheets::ROOM NO ; " " ; "¶" ) ) > 0
          • 2. Re: Portal filter script
            feait

                 Thanks for the suggestion Phil. Didn't work I'm afraid, when I replaced the filter with your suggestion, the portal still didn't displace results separated by a space or with a space at the beginning/end of a line

            • 3. Re: Portal filter script
              philmodjunk

                   I'm curious as to why the requirement that the adjoining rooms be listed in a single field let alone a list separated by spaces. A related table that lists adjoining rooms would make more sense to me here.

                   While pattern count should work with the sample data shown, I'd be inclined to use:

                   Not Isempty ( FilterValues ( Substitute ( Room Data Sheets::adjoining Rooms ; " " ; ¶ ) ; Room Data Sheets::ROOM NO ) )