Cancel an endpoint workflow with a custom function

Options
pachocastillosr
pachocastillosr Member
edited June 2023 in ? Help! I'm a Noob

Hi,

I have endpoint A.
I have a custom function A which does some calculations and defines if endpoint A should be stopped prematurely.

Can I stop endpoint A by adding a "Return" function (or any other function that allows stopping a running the workflow) into custom function A or I will have to add the "Return" function to endpoint A necessarily?

I would prefer to have everything inside the custom function so that I can reuse it on other endpoints.

Thanks!

Best Answer

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Answer ✓
    Options

    You could put a precondition into your function A. That would terminate not only the function but also any other code running it, giving you I think your intended result.