getMatrixValue Step

Use this step to fetch a value from n (x) n matrix.

Last published at: October 8th, 2024

Description:

This step fetches the XML node value from the n (x) n XML matrix

 

Inputs

  • columnName – name of the column
  • rowIndex – position of the row
  • XMLVariable – variable that stores the in-memory matrix
  • valueVariable – variable to store the value of the matrix row-cell 
 

 

Returns

  • True – step executed successfully
  • False – step failed to execute 
 

 

Usage:

 

 

Example:

Let’s build and execute the "getMatrixValueDef" example.          

  • Create a new definition called "getMatrixValueDef"
  • Select the definition and click the “design” button
  • Drag a “UpdateVariable, getMatrixValue” step from the toolbox
  • Connect the dots between the Start and the steps as above
  • Click on the “updateVariable” step to configure its “Settings” properties. Provide a name to the step. Select the “Advanced” tab. Provide the variable/global reference which holds the XML data and the XML value.  

 

  • The XML data value is included here for reference. 
<CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
<CD>
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tyler</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1988</YEAR>
</CD>
<CD>
<TITLE>Greatest Hits</TITLE>
<ARTIST>Dolly Parton</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>RCA</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1982</YEAR>
</CD>
<CD>
<TITLE>Unchain my heart</TITLE>
<ARTIST>Joe Cocker</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>EMI</COMPANY>
<PRICE>8.20</PRICE>
<YEAR>1987</YEAR>
</CD>
</CATALOG>

 

  • Click the “getMatrixValue” step to configure its “Settings” properties. Then, give the step a name. 

 

  • Click the “getMatrixValue” step to configure its “Advanced” properties. Provide the variable/global XML reference. Provide the XML node as the name of the column. Provide the value as the row index. Provide the variable/global reference to store the fetch result. 

 

  • The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new process instance, and execute. Render the process instance. Click on the process step to view the properties. The step should get the XML node value from the XML matrix.

 

Definition Sample:

You may download the sample definition(s) from the link here and later import it (drag-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.

NOTE: Please verify and complete the process steps for any missing configurations, such as file path references and database connections after import. Then, save the definition to confirm the changes.

Click here to download the sample file.