Miscellaneous Functions

Top Previous Topic Next Topic  Print this topic

The functions found in the Miscellaneous group are not fitting for other category groups of functions.  In this section, you can find helpful information about these functions and how to use them in your Data Diagrams.

misc_intro

Figure 1:  The Miscellaneous functions available in the Functions dialog.

Usage

To insert a function from the Miscellaneous group, simply select Functions from the Side Menu to access the Functions Dialog.  Here you can select the desired function to insert into your Data Diagram.  Once inserted, you can use data mapping to make data connections determining the flow of your data to your output data source.

If-Else

misc_ifel

The If-Else function is available if you would like to use a logical condition to test your data and then specify results for both when the condition is met and when the condition is not met.  Depending upon the condition, a value will be returned for true and false appropriately.  To demonstrate the usage of this function, we will use an example with a specified need to display our records in our output report only as work departments "Accounting Department" and "Non-Accounting".

In order to make this transformation successfully, we will use an If-Else function.  This function will test for when the Department field is equal to "Accounting".  If true, we will specify the value to be a constant "Accounting Department".  If the result of our condition is false, we will return the value "Non-Accounting".  Notice that the If-Else function requires three input Data Connectors.  One connector is for the Boolean value of the test condition and the other two are the specified input values for both true and false returns.

misc_ifeldiag

Figure 2:  The If-Else function is used to assign values for true and false results of a conditional test.

misc_ifelout

Figure 3:  The output preview reveals the new attribute values for report display.

Position

misc_pos

The Position function is useful when you would like to return the position of the current iterated record in the referenced data source.  As an example, if we wanted to only include work hours from our work history database table for the Accounting department, yet we still needed to reference the position of these reported records for other needs.  We can simply insert the Position function into our Data Diagram to retrieve this value.

 

In this example, we've used the Equal Function to test for when the Department field is equal to "Accounting" and use this return Boolean value as the input for our Filter.  Next, we've inserted the Position Function.  This function has an input Data Set Connector that the table must be connected to return the position related to this data set.  The output data connector is mapped to the element sequence in our output data source using the Filter.

misc_posdiag

Figure 4:  The position function is used to return the position of the current iteration in the output XML.

misc_posout

Figure 5:  The output preview displays the records for Accounting and with the position attribute present.