Dynamic database forms – easy!

It’s a very common business need. Enter a client id and you want client details to automatically fill in from the DB. Select an order and you want to view/edit order line item details. The problem is, it’s not easy to do even for programmers. There are all the details of connecting to the database, managing shared DB connections, error handling, transforming data back and forth between SQL and HTML forms, security/authentication and so on.

Not so with frevvo. It’s amazingly simple with our built-in Database Connector. You can find many details and try it out yourself by following our Database Connector Tutorial.
1. Write your SQL query in the DB Connector

SELECT p.productName as product, o.quantityOrdered as quantity, o.priceEach as price, p.productDescription as description, p.MSRP FROM OrderDetails o, Products p WHERE o.productCode=p.productCode and o.orderNumber={onum} ORDER by o.orderLineNumber

The {onum} is a variable representing the order number. It will get a list of line items for a particular order.

Database Query

2. Add it as a data source to your form or workflow
Generate an XSD for your query (using a sample order) simply by visiting the URL for your query in the DB connector. Save the XML and upload it to frevvo as a data source.

XML Schema

3. Generate the form with the click of a button
Drag/drop to customize as desired.Click the + icon for the data source and frevvo will generate controls. Since this query can return multiple line items, frevvo will generate a repeating section. We’ve changed it to a Table (grid) again just by modifying a property.

Generate FormCustomize

4. Link the form to the SQL query in the DB Connector
Open the Doc URI Wizard and set the URL for the data source to point to your query. In this case, we’re getting the order number variable from a separate drop down in the form.

Link to the SQL Query

That’s it. Try the form. When you select an order, the underlying Table automatically updates with the list of line items for that order. frevvo will automatically add and remove rows as necessary. No programming needed to create a form as sophisticated as this.

Order Line Items

Interested? To learn more Sign up and check out the Database Connector Tutorial. Or contact us for more information.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: