Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this example we have an Excel file that has a series of rows that existing Database that contains data we want to use to populate a dropdown in our Volt app. I created an Excel file with a list of Colors and a second file with a list of States. Using Link we can create a service that will enable this content to be pulled into our Volt applications. This is a great alternative to hard-coding dropdown optionssurface in a Volt application. I will be demonstrating how I connected to an Oracle database.

Create Link Connector

  1. Launch the HCL Link admin page, http://localhost:9990/login (In my deployment I changed the port).

  2. Make sure that you are working with the “_app_volt” project and “deploy_action=true” in the url. I set a bookmark that has the relevant url suffix, http://localhost:9990/workspace?_p=60a4454d8f331f240bfea01b&app=_app_volt&deploy_action=true.

  3. Close the popup dialog that shows when the page first loads.

  4. On the bottom of the screen click “Connections”, and then “New”.

5. Select “JDBC” from the list of available types and click “Next”:

...

6. For the connection properties provide the URL, as a jdbc connection string, and the user and password to connect to the database.

...

7. Enter a meaningful name and description for the Connection.

...

The name will appear in the HCL Volt Service Catalog dropdown, therefore it should be something that is easily recognized and understood by those that will use it.

...

Create an Action

78. The Connection now appears in the Connection List. Expand the Connection List, hover over “Excel”“Oracle”, click on the 3 vertical dots and click “New Action”.

...

89. We are create creating an action where the content in the Excel file database table is the source. Select “Source” for the Action Type and click Next.

910. In the Properties section:

i) Select “--- Upload File ---” from the Excel File dropdown.

...

ii) Read Mode and WorkSheet Identifier can be left to their default values. For more information regarding these properties refer to the HCL Link documentation.

iii) Click “Table” as the Source.

ii) In my case Catalog is empty.

iii) For Schema, click the “Fetch” button. This connect to the database and load the schemas it finds. Select the correct one.

iv) For Table, click the “Fetch” button. This will detect the worksheets in the provided Excel file. Select the worksheet that contains the content for the service.ivconnect to the database and load the tables it finds. Select the correct one.

v) The rest of the properties can be left to their default values.

...

vvi) Click Next.

1011. In the Schema section, select New, enter a name (i.e. Excel Colors Schema), and click “Generate”. The Schema Type dropdown will show you the structure of the filedatabase table. The value that you select here will change the output of the service. In this case we want all the rows to be returned, therefore select “Row” “RowSet” as the Schema Type and click Next.

...

1112. In the Identification section provide a meaningful name and description.

...

This detail will be shown in the Volt UI and used to identify the service. Note: As a service is updated in Link, Volt will report the version of that service and the last time that it was updated. It is important to note that all previous versions of a Link service can be executed, therefore updating a Link service will not break any apps that are using it.

...

1213. When you click OK, as long as you have “deploy_action=true” in the URL, a popup will appear and show the progress of the Action being deployed.

1314. The Connection and Action will now appear in Volt. There is a task that runs every 6 minutes to update the content from Link to Volt. You may also restart the Domino HTTP task if you want the Link content to appear in Volt immediately.

1415. You are now ready to use the Link Connector/Action!

Setup Service in Volt

1516. Create a dropdown table on your form canvas . Set the label to “Colors from Excel File”and add as many fields as you have columns in the database table (or just the ones you care about, in my case is 3). In the field table properties, under Options Events click the Edit button. Select “Use onShow event. Click “Call a Service” for the option type and then click “Add/Edit Service Configuration”.

...

Note: You may also create the service from the Settings tab. Under Services select the form that will contain the service. Click Add Service Configuration.

...

1617. Select “Select from Service Catalog”, select “Excel” your database connection (for me it is “Oracle”) from the Service Catalog dropdown, select “List Colors 2” the action (for me it is “List Help”) and click Next.

...

1718. Click Next as there are no Inputs for this service.

1819. Map “COLA” The output parameters to the Saved and Display value columns of the dropdowntable.

...

1920. Save and Preview the form. When the form loads you should see all the colors appear in the dropdown.

...

21. You are all done! You have successfully pulled data from a database into your Volt application from HCL Link.