5 Replies Latest reply on Dec 6, 2013 9:30 AM by DavidKinally

    URL scripting HELP PLEASE!

    DavidKinally

      Title

      URL scripting HELP PLEASE!

      Post

           Hi There,

            

           I am building my database and i have a section for a product serial number input. I want to be able to type in the serial number into that field and if needed i can press a button that opens a url containing that serial number where specified.

            

           eg.

           serial number is C02JVF46DKQ1

           i would like to past that into this url

           https://selfsolve.apple.com/agreementWarrantyDynamic.do?sn=&locale=en_GB&caller=sp

           the url i want to CREATE and end up with is:

           https://selfsolve.apple.com/agreementWarrantyDynamic.do?sn= C02JVF46DKQ1 &locale=en_GB&caller=sp

           so effectively i would like to copy the serial number and paste it into the particular place in the url and then go to that url.

            

           Is this possible and if so ... HOW?

                      
                     Preferences
      §
      1
      2
      3
      4
      5
      6
      7
      8
      9
      0
      -
      =
      Backspace
                           
      Tab
      q
      w
      e
      r
      t
      y
      u
      i
      o
      p
      [
      ]
                                
      Return
                                
                           
      capslock
      a
      s
      d
      f
      g
      h
      j
      k
      l
      ;
      '
      \
                           
      shift
      `
      z
      x
      c
      v
      b
      n
      m
      ,
      .
      /
      shift
                           
                                
                               English
                                     
                                     
      alt
      alt
                           
                      
                     Preferences

            

        • 1. Re: URL scripting HELP PLEASE!
          philmcgeehan

               When you specify the URL to open, it should look like this:

               "https://selfsolve.apple.com/agreementWarrantyDynamic.do?sn=" & SERIALNUMBER & "&locale=en_GB&caller=sp"

               Where SERIALNUMBER is the field in which your serial number is stored.

          • 2. Re: URL scripting HELP PLEASE!
            DavidKinally

                 I have tried this. and does not work. Do i need to calculate something?

                 I have attached a screen shot

                            
                           Preferences
            §
            1
            2
            3
            4
            5
            6
            7
            8
            9
            0
            -
            =
            Backspace
                                 
            Tab
            q
            w
            e
            r
            t
            y
            u
            i
            o
            p
            [
            ]
                                      
            Return
                                      
                                 
            capslock
            a
            s
            d
            f
            g
            h
            j
            k
            l
            ;
            '
            \
                                 
            shift
            `
            z
            x
            c
            v
            b
            n
            m
            ,
            .
            /
            shift
                                 
                                      
                                     English
                                           
                                           
            alt
            alt
                                 
                            
                           Preferences

                  

            • 3. Re: URL scripting HELP PLEASE!
              DavidKinally

                   theURL then opens

                   https://selfsolve.apple.com/agreementWarrantyDynamic.do?sn=%22%20&%20SerialNumber%20&%20%22&locale=en_GB&caller=sp

                              
                             Preferences
              §
              1
              2
              3
              4
              5
              6
              7
              8
              9
              0
              -
              =
              Backspace
                                   
              Tab
              q
              w
              e
              r
              t
              y
              u
              i
              o
              p
              [
              ]
                                        
              Return
                                        
                                   
              capslock
              a
              s
              d
              f
              g
              h
              j
              k
              l
              ;
              '
              \
                                   
              shift
              `
              z
              x
              c
              v
              b
              n
              m
              ,
              .
              /
              shift
                                   
                                        
                                       English
                                             
                                             
              alt
              alt
                                   
                              
                             Preferences

                    

              • 4. Re: URL scripting HELP PLEASE!
                philmodjunk

                     You need to remove the backslash characters (\) just before and after the SerialNumber field reference so that it and the ampersands evaluate as part of a calculation instead of being included as quoted text. You will also need to use the name of the table occurrence from which you are accessing the SerialNumber field: YourTableNameHere::SerialNumber.

                     If you click the specify button, you can open up this expression in the Specify Calculation Dialog where you can add a field reference by double clicking the field in the list of fields to add it with a syntactically correct TableOccurrenceName::FieldName format.

                • 5. Re: URL scripting HELP PLEASE!
                  DavidKinally

                       EXCELLENT!!! just noticed the backslashes and the table wasn't specified.

                       Works like a treat!!!

                       UNBELIEVABLE!! thanks

                                  
                                 Preferences
                  §
                  1
                  2
                  3
                  4
                  5
                  6
                  7
                  8
                  9
                  0
                  -
                  =
                  Backspace
                                       
                  Tab
                  q
                  w
                  e
                  r
                  t
                  y
                  u
                  i
                  o
                  p
                  [
                  ]
                                            
                  Return
                                            
                                       
                  capslock
                  a
                  s
                  d
                  f
                  g
                  h
                  j
                  k
                  l
                  ;
                  '
                  \
                                       
                  shift
                  `
                  z
                  x
                  c
                  v
                  b
                  n
                  m
                  ,
                  .
                  /
                  shift
                                       
                                            
                                           English
                                                 
                                                 
                  alt
                  alt
                                       
                                  
                                 Preferences