Get Block Count

This is pre-built Action located under the @Generic Element, instructs the Avo Assure to fetch the total number of the blocks that are present in Input Value and save the result in the given dynamic variable.

Syntax

Input Value: <XML block/XML tags>;<block name>

Argument
Description

<XML block/XML tags> (Required)

Specify the XML block or tags to retrieve the block count.

<block name> (Required)

Provide name of the XML tag/block whose occurrences need to be counted.

Output Value:

Argument
Description

<Dynamic Variable> (Required)

This variable stores the number of XML blocks or tags.

<Dynamic Variable> (Optional)

This variable stores the status as true or false

Example

Counts the total number of occurrences of a specific block in the provided XML content The Get Block Count action takes the value from the Input Value column (e.g., <Root><User><Name>John</Name></User><User><Name>Jane</Name></User></Root>;User) and counts the number of times the specified block name appears within the given XML block or tags. The count result is stored in the {Count} variable, while the execution status is stored in the {Status} variable, with the following possible values:

  • True – if the block count is successfully retrieved.

  • False – if the count operation fails or an error occurs.

Last updated