Passing Parameters to an Application Page via a URL

You can enter the parameters for an application page in the URL.  To do so, use the following format:

 

//SERVERNAME/REALM/GUID/VIEWAPP/PageName?x=0&y=0&PageParms=Parm1Name=Parm1Value%26Parm2Name=Parm2Value

 

  where:

 

'SERVERNAME'

is the address of the server  (www.trihedral.com)

'REALM'

is the realm that has been configured for the application

'GUID'

is the application's GUID (found in GDI.WIF in the app directory)

'VIEWAPP'

is a directive to view the application

'PageName'

is the name of the page to view

?

separates the url from the parameters

'x=0&y=0'

are two parameters, setting the upper left x and y position of the window

'&PageParms='

starts the section for the application control parameters

'Parm1Name=Parm1Value'

sets the first parameter, Parm1Name, to the first value: Parm1Value

'%26'

is the separator used between multiple parameters

'Parm2Name=Parm2Value'

sets the second parameter, Parm2Name, to the second value: Parm2Value

 

 For example, the following is the source code for a page containing a red circle with a black outline. Note the two parameters, FillColor and OutlineColor defined at the beginning of the code and then used in the definition of the ellipse.

 

(

  FillColor;

  OutlineColor;

)

[

  Title = "Page1";

{ we will assume that the name of this page is the same as the title }

]

Main [

  Return(Self);

  GUIEllipse(292, 432, 612, 136,

             1, 1, 1, 1, 1 { Scaling              },

             0, 0          { Movement             },

             1, 0          { Visibility, scaling  },

             0, 0, 0       { Selectability        },

             Brush(PickValid(FillColor, 12), 0, 1),

             Pen(PickValid(OutlineColor, 0), 1, 4));

]

 

To call this application, opening Page1 and setting the fill color to green and the outline to blue, we would use the following URL:

 

http://white.trihedral.com/TEL1/7fd9d82c-9ab9-11d1-a122-0060971477af/VIEWAPP/Page1? x=0&y=0&PageParms=FillColor=10%26OutlineColor=9

Up to 105 parameters per page may be set within the URL as long as it does not exceed 2083 characters.  It is up to the provider of the URL to properly escape the parameters in HTTP format (e.g. spaces should be replaced with "%20"). Additionally, Microsoft has limited the allowable length of a URL in Internet Explorer to 2083 characters (Microsoft KB article 298427).