Manipulating the result of a data source is really simple. You can use the child element Output
when setting the Data Access. Let's suppose we are performing a query that is returning 10 columns, but we only want to display the first two. If that's the case, then you should set the following child element in the Data Access definition:
<Output indexes="0,1" mode="include"/>
This child element tells CDA that it should use the first and second columns, identified by index 0 and 1. The mode will tell CDA that these are the columns to be included; otherwise, if you use exclude
, you will get all the columns except the first two.
When accessing a query through a URL, another way to manipulate the output is to have a different output format. This can be achieved by calling the URL and adding a parameter outputType
of one of the following formats: JSON, XML, CSV, XLS, or HTML.
For example, if you want to manipulate the output of the data source, you can...