Cancel an endpoint workflow with a custom function
Options
![pachocastillosr](https://us.v-cdn.net/6037124/uploads/userpics/MC7ELS8NG1HC/nPLP98RNMYYEZ.jpg)
pachocastillosr
Member ✭
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
-
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.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback