What is the best way to use the size of a list in a rule?

I am looking to use the quantity output of a fetched entity step, but it is not available. I want to compare the number items I have fetched into with an integer in a rule. How would I go about doing this?

Comments

  • Hello,


    You can use the the size of a list in a rule by through using the count. You can do this by creating with any given input name with type integer. After that, you can set the rule criteria. 


    For this following example I will fetch the amount of accounts. 



    Steps:

    1. Fetch a list using a fetch entity step. Give the output a name (my example: EntityResults)

    2. Create or pick existing statement rule.

    3. Setup Input Data -> Define Input Data -> Give Input name and type int32


    4. Set rule criteria using input from step 3.

    5. Input "<Name from step one>.count" into rule input. 


    This is a way to measure the size of a list in a rule. Here is more information on fetching entities and rules: 

    Fetch Entity: https://documentation.decisions.com/step-library/docs/fetch-entities-step

    Statement Rules: https://documentation.decisions.com/docs/creating-statement-rules

Sign In or Register to comment.