Versions Compared

Key

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

Image Removed 

This page is currently under construction. Please visit the Database Connector Tutorial for details on using both Doc URI's and Business Rules to integrate with your database.

The No-Code Doc URI Approach

...

This tutorial will step you through how to add your SQL statements to a file so that the Database Connector can access and execute them, quickly create a form based on this schema, set up dynamic dropdown options and link your form to the database without writing any business rules or code. You can also watch this video which walks through the same steps.

...

  1. Log into frevvo as the designer user.
  2. Navigate to the Project where you will create your form (or create a new Project.)
  3. Click the Schemas tab.
  4. Click the blue plus icon to add a new schema.
  5. Provide a name and description and upload the allproducts.xsd file you saved earlier.
  6. Click Upload

Create the Form

...

  1. Drag and drop a Dropdown control to you form. 
    1. Label "Select Product Line"
    2. Name "pl"
  2. Change the Options Src property to Web Service.
  3. Set the Options Url property to the URL you generated earlier. In our example this URL is http://localhost:8082/database/products/productlines?_mediaType=json
  4. The Value Binding and Label Binding properties set the options syntax value=label. In this case they are both the same, the column name productLine. When using json data, we'll prepend that column name with /resultSet/.
    1. Value Binding: /resultSet/productLine
    2. Label Binding: /resultSet/productLine

...

  • Go to the Database Connector status page (http://localhost:8082/database/status). This page will confirm if you database connector is running. See this documentation on testing your Database Connector.
  • Check your database connector logs. If an error occurred, the description will display here. You can also enable the DEBUG logging level to get even more information if needed. The error description should help point you to an issue with your configuration.xml or your database's response.
  • Run the query URL in a browser tab, as described above. This will rule out an issue in configuration.xml. If it works, then the problem may be in your form properties. If it fails, check your configuration.xml for typos or other syntax errors. 
    • Some values must be passed inside quotes, such as '{productCode}'. Test the SQL Statement in your database to see which values require this syntax.
    • Variables that reference controls in the form are case sensitive.
  • Check your Form Setting: Document Actions: Send Data settings and ensure the correct Read/Write URLs and methods are set, including any necessary parameters. It's often helpful to copy/paste the URL from a successful test in the browser.
    • Remember that SELECT statements with a WHERE condition must use a URL parameter to input the WHERE condition's value. Similarly, if your SELECT (with WHERE) and DELETE statements are in the same query, the Write URL must also include that parameter.

...