Configuring a Host Session at Run Time

When you create your application, you create a design-time host connection with configuration information that is also used for the run-time session. If you need to configure the session with information that is only available at run time (for example, the user name or the IP address of the client computer), you can use a Configure action, and then a Connect action, within an event.

This is typically done in the On Startup event, but you can add these actions to any event in your application.

To configure the host session at run time
  1. Open your project in Presentation Designer.

  2. Create or modify an event.
    To
    Do this
    Edit the start up event (only client runtime environment variables will be available to use for configuration)
    1. From the Edit menu, choose Project Properties.

    2. In the Project Properties dialog box, under Project, choose Startup/Stop.

    3. Click the Edit Application Startup button.

      The Event editor displays showing the ApplicationStartup event.

    Add an event within your application (any eligible data from your application will be available to use for configuration)
    • See the topic, Adding Events, Overview to learn how to create an event — there are many types of events that you can create.

      Make sure that you have the Event editor open before moving on to the next step.

  3. In the Event editor, from the Actions List, click the Session button.

    The Session actions appear from the Actions list.

  4. Add a Configure action to the event.

    If you are editing the ApplicationStartup event, add the Configure action before (above) the Connect action.

  5. Under Configure, from the Select a Host to Configure list box, select the host to which you want to connect.

    You must have already made a design-time connection to the host before it will appear in this list. To learn how to create a design-time host connection, see Connecting to a Host, Overview

  6. Click the Assign Host Properties button.

    The Assign Host Properties dialog box appears, showing the eligible data on the left, and the configurable host properties on the right.

  7. Assign a data element from the list on the left into the host property that you want to configure on the right, and then click the Add Mapping button.

    -or-

    Create a constant (right-click an operation input and choose Map Constant), and type any value to map to the input.

    Note
    • If you are editing the start up event, only the client run-time environment variables (IP Address and User Name) will be available to use for configuration. If you are adding an event within your application, the client run-time environment variables, any previously defined global variables, plus any eligible data from the current form and host screen will be available to use for configuration. To use data from a different part of your application, first assign it to a global variable.

    • You can select an input and click the Properties button at the bottom of the window to learn more about it.
  8. Click OK.

  9. If you are editing the startup event, click OK to close the Event editor.

    -or-

    If you are adding an event within your application, add a Connect action after (below) the Configure action, select the same host as the one you've just configured, and select the expected start screen, and then click OK to close the Event editor.

Related Topics
Bullet Adding Events, Overview
Bullet Connecting to a Host, Overview
Bullet Editing the Start-up Event
Bullet Action Descriptions: Configure
Bullet Action Descriptions: Connect
Bullet How to Provide Host Access IDs to Clients
  Attachmate