Legacy Dev Forum Posts

 View Only

Sign Up

How to handle data action that returns array in architect

  • 1.  How to handle data action that returns array in architect

    Posted 06-05-2025 18:42

    Gulafsha | 2021-01-27 15:19:21 UTC | #1

    Hi,

    We have created a data action that returns dynamic array(Maximum no of elements can be Six). It is running fine in actions. However, if we are using the same data action in our architect it is not working it is giving some error handling in a case where the number of elements in the outputs is less then six.

    we want to use a decision box that checks if the next information is available(being returned by action). but since the variable is not getting created "ifNotSetOrEmpty" function is sending flow into error handling message.

    This is the Output Contract:

    { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [ "claims" ], "properties": { "claims": { "type": "array", "items": { "type": "object", "properties": { "claimNumber": { "type": [ "string", "null" ] }, "eventNickname": { "type": [ "string", "null" ] }, "eventType": { "type": [ "string", "null" ] }, "policyProductCd": { "type": [ "string", "null" ] }, "claimStatusCd": { "type": [ "string", "null" ] }, "claimSubStatusCd": { "type": [ "string", "null" ] }, "policyNumber": { "type": [ "string", "null" ] }, "lossDate": { "type": [ "string", "null" ] }, "reportedDate": { "type": [ "string", "null" ] }, "lossDescription": { "type": [ "string", "null" ] }, "insured": { "type": "object", "properties": { "firstName": { "type": [ "string", "null" ] }, "middleName": { "type": [ "string", "null" ] }, "lastName": { "type": [ "string", "null" ] }, "suffix": { "type": [ "string", "null" ] } }, "additionalProperties": true }, "totalBenefitAmountPaid": { "type": "object", "properties": { "value": { "type": "number" }, "currencyCd": { "type": [ "string", "null" ] } }, "additionalProperties": true } }, "additionalProperties": true } } }, "additionalProperties": true }

    Please lets us know. Thanking in advance

    Regards, Gulafsha


    Jason_Mathison | 2021-01-27 18:43:01 UTC | #2

    Hi Gulafsha,

    Instead of using ifNotSetOrEmpty you should be able to do something like Cound(Flow.claimNumber) to get the size of the list. From there you can make your decisions based on the size of the list.

    --Jason


    Gulafsha | 2021-01-28 13:54:59 UTC | #3

    Hi Jason,

    This is exactly what i wanted...... and it has worked. THANKS A LOT.............

    Regards, Gulafsha


    system | 2021-02-28 14:03:39 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 9818