Return two Value from rule

Return two Value from rule

Comments

  • Hi Jannie,

    What is the condition to your rule?

    If you are just checking that a condition has been met, I would use a String Equals - Case Insensitive step to check this condition (this will give you a true/false outcome) then use two create data steps, one for True that has the DefalutOutputData and a status of 200 and another one for false that has the status of 400.

    This way depending on how your criteria is met you will either get the 200 or 400 status.

  • [font=Roboto]Hi , Thanks for the info but where i can find this string equals thing , also i creating a rule, so when the rule get true i need return a data and return some data on false case as well[/font]

  • Unknown
    edited November 2023

    Hi Jannie!

    The String Equals - Case Insensitive rule is a preconfigured rule that comes with Decisions by default. Ive attached some documentation below.

    [url=https://documentation.decisions.com/step-library/docs/string-equals-steps]https://documentation.decisions.com/step-library/docs/string-equals-steps[/url]

    I agree with Jamies suggestion - rather than trying to get the rule to output a value, we can add [url=https://documentation.decisions.com/step-library/docs/create-data]Create Data[/url] steps to the two output paths, and have them set to output the expected code. The logic would look something like this:

    Hope this helps!

    -Ethan

  • Unknown
    edited November 2023

    I have a rule, i need to return two value from rule but get only one return type after creating that rule in the flow, i get only one arrow out this rule, i need two return type on returning value from rule. It work fine in the case of true and false return type

Sign In or Register to comment.