Eric Patrick
Eric Patrick

Reputation: 2247

qbo3 Rendering data from API calls

I am using qbo3 to fetch data from our data warehouse (Process/MyApiCall?Foo=Bar), and I'd like to display the data to an end user. Does qbo3 have a standard UI for such data (without knowing the schema in advance)?

Upvotes: 0

Views: 32

Answers (1)

Eric Patrick
Eric Patrick

Reputation: 2247

qbo3 contains Templates/Report/Standard.xslt that will render a DataTable or DataReader as an HTML table.

To view the API data in raw HTML format:

// View as XML
Process/MyApiCall?Foo=Bar&Output=Xml

// View as JSON
Process/MyApiCall?Foo=Bar&Output=Json

// View as an HTML table
Process/MyApiCall?Foo=Bar&Transform=Templates/Report/Standard.xslt

To wrap this same output in the standard QBO skin:

Theme.ashx/Wrap?ClassName=Process&Method=MyApiCall&Foo=Bar&Transform=Templates/Report/Standard.xslt

The Standard.xslt will render a <table> for each DataTable returned by the API call, and a <th> for each column returned in a DataTable.

If the columns follow standard QBO convention with {Table}ID / {Table} paired next to each other, QBO will combine these results into a single column, displaying {Table} with a hyperlink to the underlying record. Note that this feature only works with QBO-recognized Modules (found in Configuration > Modules).

Upvotes: 0

Related Questions