When building any business logic inside Xano (or when we're making the data do the things we want it to do), we use this feature to accept values, manipulate values, and then return values to the user.
β
It can be found when building APIs, Tasks, Functions, Triggers, and Middleware. The concept is largely the same.
β
Note: Tasks do not have inputs, as they run automatically, and often rely on values queried from the database, or an External API source.
Inputs
Inputs
Inputs are values that we pass into the Function Stack. These are values that we can specify elsewhere, and then use in our actual logic workflow.
β
Inputs can be all kinds of values. We support numbers, texts, files, dates, timestamps, and more. We also support specifying whether the values are singular values, or list values.
You can read more about inputs here in our documentation.
Logic
Logic
Inside the Function Stack component of the Function Stack, we can use our inputs. We can also query data from elsewhere: either through your database, or an API. To say, inputs aren't the only way that we can add data to the Function Stack.
But, as you use the function stack, keep in mind that the data you'll be using will be in JSON.
Response
Response
The response is the end-result of our function stack. We can keep it empty, or we can fully customize its output. If you're looking for ways to customize the response, you can see how to do so here.
The response JSON can be used to help with displaying data on your frontend, or it can even be used within your backend logic as it "communicates" with each other.