Create an Advanced View

For those CorasWorks customers who are using the CorasWorks Application Service (CAPS) or the Advanced components included within the CorasWorks Platform, Chart Displays offer the ability to create a view based upon XML data that is stored in another site.

The process to create an XML view in a Chart Display is not very different from creating a Standard view.

1.  On the Views page of the Data Display, select the Create Local View option. The View Details page is displayed.

2.  Fill out the information on this page as usual, but set the View Type to Advanced View (XML based).

3.  When you click Next, you will see that the next page is called Data Source. This page is where you identify the URL where the XML data is located.

4.  At the URL prompt, type the URL of the site where the XML data you want to work with is located.

5.     If the URL is located on a different server, place a mark in the checkbox. Provide the appropriate information at the prompts for User, Password, and Domain.

6.     If you wish, you can use the Pass Through XML area to pass page parameters onto the page specified in the URL property. The < and > symbols must be encoded (e.g., < &lt; and > &gt;). The following variables are supported:

      <%CurrentPageFolder%> - The current folder URL where the web part resides (e.g., http://www.company.com/sites/site1/connections)

      <%HostName%> - The host name of the site where the web part resides (e.g., www.company.com)

      <%SiteSecurityType%> - The protocol type of the site where the web part resides (e.g., http://)

      <%SiteURL%> - The absolute path to the site where the web part resides (e.g., http://www.company.com/sites/site1)

Example:

                <PassThrough>

                                <Pass>

                                                <PTType>get</PTType>

                                                <PTRequest>SearchString</PTRequest>

                                                <PTName>SearchString</PTName>

                                                <PTDefault>[Me]</PTDefault>

                                </Pass>

</PassThrough>

 

Where:

      PTDefault (Optional) – String – The default text that will be sent to the page from which data is being requested, if the parameter is not passed into the page.

      PTName (Required) – String – The name of the parameter that is to be passed onto the page from which data is being requested.

      PTRequest (Required) – String – The name of the parameter that is being received by the page.

      PTType (Required) – String – Controls the type of pass through. Use "post" to store the parameters in the header of the request or use "get" to store them in the URL.

7.  The Add Column XML area can be used to add a column to the data collected from the external XML source(s). This is useful if you want to set a default value for a column if the initial column is null, like a currency field.

Example:

<AddColumn>

<Column>

<ColumnName>ZeroOfGroup1</ColumnName>

<ColumnType>System.Int32</ColumnType>

<Expression>IsNull(1*[Group Value0], 0)</Expression>

</Column>

</AddColumn>

 

Where:

    ColumnName (Required) – String – The name of the column you want to add.

    ColumnType (Optional) – String – The type of column you want to add.

    Expression (Optional) – String – The expression used to store data within the column.

8.  Click Next or select Data Selection/Columns from the left-hand navigation area. The Columns page is displayed next. This page is very similar to the Columns page used for Standard views. The two key differences are:

      You are not prompted to select a model list

      An additional checkbox to determine column data types is shown

9.  A checkbox labeled Automatically determine column data types is selected by default.

      When this checkbox is selected, the Grid Display will determine the data type for each column based upon the first five records returned.

      If the builder removes the mark from this checkbox, all of the data will be treated as text. This means that numeric sorting will not be available and the only type of totals available on the Advanced XML columns will be “Count.”

10. An option called Define column types in xml is available as an alternative. When this is selected, the builder can convert collected data from a string to a different type. With means that numeric sorting is available and there are more types of totals available than only “Count.”

Example:

<Convert>

<Column>

<ColumnName>Start Date</ColumnName>

<ColumnType>System.DateTime</ColumnType>

</Column>

<Column>…</Column>

</Convert>

 

Where:

    ColumnName (Required) – String – The name of the column you want to convert.

    ColumnType (Required) – String – The system type you want to convert the column to. Valid options include:

System.Boolean

System.Byte

System.Char

System.DateTime

System.Decimal

System.Double

System.Int16

System.Int32

System.Int64

System.SByte

System.Single

System.String

System.TimeSpan

System.UInt16

System.UInt32

System.UInt64

      Table Name (Optional) – String – The name of the table that contains the column to convert. The TableName comes from the Table node used in the XML. For instance if your xml looks like <Data><Title>Hello</Title></Data><Data><Title>World</Title></Data>
the name of your table is “Data”.

11. Next, select the columns you want to work with by highlighting them in the Available Columns area and clicking the right arrow button.

12. The remainder of the Display Wizard pages are the same as for a Standard view, with the exception of the Filtering page. Filtering is done at the Advanced Provider level, so the Filtering page is not provided here.

13. When you are finished creating the Advanced view, either click Views to return to the Data Display’s Views page or click Finish to return to the display. Either option will save your changes.