1 Reply Latest reply on Apr 1, 2014 3:29 PM by philmodjunk

    Displaying only variable end text of URL

    garyjones

      Title

      Displaying only variable end text of URL

      Post

           Hi,

           I am reasonably new to Filemaker but like it so far and am diving in. Would appreciate some help if possible.

           We have an intranet bulletin board to which faults are reported. The main board features a selection of sub-boards where a fault report is posted - depending on what the fault is.

           Each fault ticket has its own web page and the end of the fault page URL consists of an abbreviation of the bulletin board name followed by a dash then the ticket number. The number of letters in the abbreviation ranges from 3 to 6 and the ticket numbers range from 2 digits to 5. For example;

           http://xxx.yyy.com/browse/ABC-12 or http://xxx.yyy.com/browse/LMNOPG-12345

           In all instances the fault page URL is preceded by "/browse/".

           I am struggling to define a generic calculation that will return and display just the ticket code from the URL - i.e., ABC-12 or LMNOPG-12345. I have been attempting to use the last "/" after "browse" in a calc with text functions but can't seem to get my head around the logic.

           Any help would be greatly appreciated.

           Thanks

           G

        • 1. Re: Displaying only variable end text of URL
          philmodjunk

               It would seem that if you can get the position of the last /, you can get all text to the right of it and that would appear to be the text that you need.

               Let ( [ Url = YourTable::YourURLFieldHere ;
                          p = Position ( Url ; "/" ; Length ( Url ) ; - 1 )  // position of last / in the text
                        ] ;
                         Right ( Url ; Length ( Url ) - p )
                      )