New Utility Function: Return

Options
Michael Udinski
Michael Udinski Administrator

ADMIN

Return is a new function which can be found in the Utility Function category of the Function Stack. 

It is a powerful function that enables you to Return a response early in your Function Stack. Before, a function stack had to run its entire course before returning the response. With the Return function, you can choose to get your API response once you have it. 

A tutorial will be coming this week so be on the lookout! 

Comments

  • Phillip Rousu
    Options
    Good stuff 
  • Damn, I'm giving this a try and it doesn't seem to complete the full scenario after the return has been executed. I thought I could return information, then have the scenario continue to run afterward. You can see this screenshot creates a user, then proceeds to create a customer in Stripe. But once the return was created, the scenario didn't continue, and when I looked in Stripe the customer wasn't there so the scenario very clearly did not continue past step 4. [Screen Shot 2022-04-08 at 6.58.16 PM.png]
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     Return is an early exit - basically saying "I have the response so leave the function stack and output the response".. Handy for scenarios like conditionals especially
  • Looking at the documentation, it seems like a 1:1 replica of "Stop and Debug" instead of what I and others suggested unfortunately. I don't see any value in this current setup, I was just hoping for faster responses while I could continue to process information in the background. Guess I'm going back to Make/Integromat to solve this ☹️  https://docs.xano.com/working-with-data/functions/utility-functions#return 
  •  Aww that's disappointing, here's to still hoping it can be a "return but continue scenario" type of function one day