4 Replies Latest reply on Oct 31, 2019 2:26 AM by Peter Lundqvist

    How to refer to current midtier URL

    Peter Lundqvist
      Share This:

      Is there a way to retrieve the current midtier URL?

       

      I want to create links to other forms from a form.

      E.g.

      I have created the form "Peters Form".

      From that form I want a link to "Marias Form" and "Anders Form".

       

      I can do this by creating a Trim Text and insert a html link in the Text properties.

      But when I move this form test to production it will still be hard coded to the test servers url.

       

      Therefore - is there a way to extract the base url for the midtier?

      Something like "https://<myserver>/arsys/forms/<arserver>/" so that I can simply tag on the form name after that.

        • 1. Re: How to refer to current midtier URL
          Mohammad Rehman

          Hi Peter,

           

          Please try the combination of the following keyword:

          $HOMEURL$

          The mid tier translates $HOMEURL$ to the base URL of the current page. The $HOMEURL$ keyword enables you to use the relative path to the application resources when creating workflow. For example, in the Set Fields action, you can enter the following text for the Set Value for the View Field:$HOMEURL$/Resources/test.html The URL is resolved at the runtime and loads a different file without changing the Set Fields action.

           

          $SERVER$

          The name of the current BMC Remedy AR System server. The configuration settings in the ar.cfg (or ar.conf ) file determine the return value as follows:

          • If the Server-Name and Domain-Name parameter values are defined, the value is: <_serverName _>+ <domainName>
          • If Server-Name is defined but Domain-Name is not, the value is: <serverName + domainNameReturnedBySystemCall>
          • If Domain-Name is defined but Server-Name is not, the value is: <serverNameReturnedBySystemCall + domainName>
          • If Server-Name and Domain-Name are not defined, the value is: <fullyQualifiedDomainName>

           

          You can set field myurl =  $HOMEURL$+"/forms/"+$SERVER$+"/"

           

          Thanks

          Mohammad

          7 of 7 people found this helpful
          • 2. Re: How to refer to current midtier URL
            Peter Lundqvist

            Keyword, yep. Thank you very much!

            1 of 1 people found this helpful
            • 3. Re: How to refer to current midtier URL
              Jason Miller

              In the days before the $HOMEURL$ keyword I use to grab it from the Server Information vendor form. At one time I even stored the value in a global field (really in a browser cookie) so I only had to fetch it if the global field was null.

               

              Admittedly I did have to open permission on the Server Info form a little. But this too was before there were Service actions in workflow so it was a Set Fields. If I needed to do this these days I would make it a Service action and let the filter run with admin permissions.

              2 of 2 people found this helpful
              • 4. Re: How to refer to current midtier URL
                Peter Lundqvist

                Thank you for this response. It helped me understand another thing I've been meaning to look up "real soon now".