There are many contexts in which passing data from one page to another via the URL is a convenient means of transferring data.
Parameters such as primary and foreign key values can be passed from one page to another through the destination page’s URL. For example, you can create a "wizard" from a New Orders page to a New Order Details page by passing the OrderID of the new Orders record on the URL so that the OrderDetails.OrderID field is automatically set in the New Order Details page.
A simple URL with a query string parameter is:
http://OrderManagementSystem/ShowOrder.aspx?ID=10248
In this example, the text string “ID” is specified as the query string parameter in the Property Sheet. The query string parameter “ID” is then used in the page’s URL. The application recognizes “ID” as a valid query string parameter and uses the value assigned to ID in the URL as part of the SQL query.
The receiving page might use the query string parameter as part of a WHERE clause that filters, or limits, the data displayed in a table, e.g.:
Order.OrderID is equal to ID
The query string parameter can be any alphanumeric string you wish. It does not have to match the database table’s field name or correspond to anything else. Your application will parse the query string, extract the appropriate parameter and value, and perform the record lookup in the appropriate database table.
In use, the query string parameter follows the URL, as does “ID” in this example:
URL parameters can be used for passing data from one page to another when a button is clicked. These URLs are specified via the Button Action Wizard in the Property Sheet. For example, when a user clicks the “Show” button on an Table Report page, the the primary key value (ID) of the selected table row entry can be passed to a Show Record page to display the full details of the selected record.
Pass data between pages using URL parameters, as shown in the Redirect Action Wizard. |
To select which URL parameters to pass:
Step 1: In the Layout Editor, select the button control you wish to configure.
Step 2: In the Property Sheet, Button actions, select Redirect and open the Redirect Action Wizard.
Step 3: Configure the URL and associated parameters.
Options |
Description |
URL |
The URL of the page to be displayed when the button is clicked. The URL field has this format: http://<Page URL>?<Parm1>=<Value1>&<Parm2>=<Value2> Here’s an example: http://AcmeOMS/View-Orders.aspx?OrderID={PK}&Name={FK} The format of the URL parameters (such as PK in the example above) is: [ControlName:][NoUrlEncode:]Type[:Value] When the URL is consumed by a Record control, the associated record is used at run-time to construct the actual URL containing the specified URL Parameters. When consumed by a Table control, the Table control’s selected record is used. The URL may include hard-coded arguments as well as parameterized arguments. There are a variety of substitution variables described inSubstitution variables. The special arguments that may be entered into this field are: |
URL Parameters |
The URL parameters, if any, to pass to the page being displayed via the URL. There is a variety of substitution variables described inSubstitution variables. In order to make pages more user-friendly, Iron Speed Designer includes new URL parameter “TabVisible=False” when you select “Navigate a specific URL within a modal pop-up” to hide tabs when page is opened in a modal pop-up. Also if you specify a control to update on the Action step, “SaveAndNewVisible=False” will be included and the Save and New button will not show up on the page opened in modal pop up. If you think the tabs or Save and New button are helpful, you are welcome to remove these URL parameters but note that there are some major limitations: if you close the window or cancel from it after one or more clicks to Save and New without ever clicking Save, underlying control will not be updated, new records will not be reflected. User will need to manually (F5) refresh a page to see new records Control is updated only when Save button is clicked. Another important limitation is that only last added record will be added to the dropdown list if it was selected to be updated so if several were added via Save and New button only last will show up in the list after Save was clicked. Tabs might not fit pop-up window and could require vertical and horizontal scroll.
|
In the generated code function calls will use substitution variables. The following substitution variable types are available:
URL parameters can be used when selecting and displaying data in an SQL query. A URL parameter can provide a value that is compared to the record's field value when that record is read at run-time. Based on the comparison of the two, the record is either included in or excluded from the result set. When Iron Speed Designer builds your application, it creates the “addFilter” mechanism that applies the comparison.
Use the Add WHERE Clause dialog in the Query Wizard (Data Sources tab, Edit…) to select the URL parameters to use in the query.
|
URL parameters can be used to initialize controls in Actions section of the Property Sheet.