When learning to build an EZWriter URL with the parameters embedded in the URL, it can be difficult to understand where to place the parameters and values. The URL that is listed on the WRI editor page may look very different from a finished URL, depending on how many parameters there are in the data source.
To understand EZWriter parameters, it helps to understand URL parameters. A URL is made of two parts. The page address (e.g. wri_p1_display.aspx) and the query string (e.g. ?oc=10&cc=REGCONF&parm=@ORGANIZATION&value=10&parm=@ACCOUNT&value=0000001). The query string is always preceded by a question mark. Each piece of the query string is a pair of name and value. In the example above, there are six name/value pairs (oc=10&cc=REGCONF&parm=@ORGANIZATION&value=10&parm=@ACCOUNT&value=0000001). Every name/value pair is separated by an ampersand (&).
All EZWriter pages will have two name/value pairs, regardless of how many parameters are included in the data source. They are named "oc" and "cc". The value of "oc" is the originating Momentus Enterprise Organization code. The value of "cc" is the Code for the WRI configuration. In the example above, the values for these are "10" and "REGCONF". Everything that follows relates to the EZWriter source parameters.
Each data source parameter used in EZWriter is comprised of two name/value pairs. They are "parm" and "value". They must be in this order and not separated by any other parameters. In the example above, there are two parameters (parm=@ORGANIZATION&value=10 parm=@ACCOUNT&value=0000001). One is @ORGANIZATION and the second is @ACCOUNT. The value for @ORGANIZATION is "10" and the value for @ACCOUNT is '0000001'.
Once you understand how EZWriter URLs are made, it is easy to understand how to link them together. For example, if you have one EZWriter page that is a listing of customer information and a second that is orders for a specific customer, you could embed *EV870_ACCT_CODE in the URL in place of the value for @ACCOUNT and provide a direct link from the customer's information to a page with all their orders.
A whole website could potentially be written using EZWriter by linking many pages together.
Comments
3 comments
How can I pass a list of values for a parameter, e.g. SPACE, in order to select several spaces in a query where clause, e.g. "where EV700_SPACE in (!SPACE!)"
0 upvotes
There may be a better way to do this, but this should work;
Pass your space list like |LOBBY|FLAGPOLE|FOYER|
Hope that helps
L
0 upvotes
Lee is pretty much spot on here. Unfortunately, SQL does not support a parameter in an IN clause.
If you are using this for an EZWriter URL, make sure to URL encode your characters (https://www.w3schools.com/TAGs/ref_urlencode.asp). A pipe in a URL will get rejected by the server, but should be OK if you correctly encode it (%7C).
0 upvotes
Please sign in to leave a comment.