Can we get the number of records that Extract Dataraptor returns?
You can use a formula in the Extract Dataraptor to obtain a record count, and you also have the ability to set a boolean output in the formula based on the count of records.
There are two possible solutions:
-
- The records fetched in the current batch, you can utilize the LISTSIZE(pass_the_list) function.
- count records based on a specific WHERE clause, you can employ the COUNTQUERY(“SELECT COUNT() FROM Contact WHERE Id = ‘{0}”, recordId) function.
Here is a Example.
I retrieved all contact records within the contactRec path.
I utilized the LISTSIZE(contactRec:Id) function in the formula to determine the total count of records. This count will be stored in the CountListByContact node, which is the recommended approach.
Following that, in the subsequent formula, I used the RecordCountByContact node to establish a boolean flag based on the record count. Using the IF condition (IF(%CountListByContact% >= 1, true, false)), the flag will be set to true if the record count is equal to or greater than 1. Otherwise, it will be set to false. The resulting boolean flag will then be stored in the ‘RecordCountByContact‘ node.
Similar to the previous step, I utilized COUNTQUERY(“SELECT COUNT() FROM Contact”) to retrieve the record count using a query. The resulting count will be stored in the ‘RecordCountByQuery‘ node. Please note that using LISTSIZE() is generally easier compared to COUNTQUERY().
please configure the output field in accordance with the object structure by setting the appropriate output path.
On screen 4, you will find the output displaying the record count and boolean flag.
Thank you!! I hope this information is helpful for you.