-
How to create a function that validates an email input
HI, I am trying to create a global function that validates an email address input when called. I cant seem to find a simple function/way to check if an email address is valid. I am working with a conditional IF statement but hoping for some guidance on where to look? Thanking you
-
Cohort analysis for financial modeling
Hi guys, Can I build cohort analysis for financial modeling on Xano? Thank!
-
Suggestion: Request History for Library Functions
Hello, I was wondering if it would be possible to have a "Request history" for the standalone functions, similar to the ones within the actual endpoints? This would make it much easier to debug issues especially when chaining functions (i.e. endpoint going to a function that goes into more functions). Thanks!
-
How can I change the timestamp format in an addon by using filters in a 'Get Records' Function?
How can I change the timestamp format in an addon by using filters in a 'Get Records' Function? Below is a recording of my current setup that works in my 'Query All Records' function. However, in my 'Get Records' function, I'm encountering the following error: 'Please use a numerically indexed array.
-
How to nullfill variable (equivalent of SQL coalesce)
I keep running into the use case of wanting to create a variable that is the first non-empty value of a series of other variables. For example for some final variable X: I want X to be the first non-empty value of variables A, B, and C So if A = 2, B = null, C = 1 then I want X = 2 If A = null, B = null, C = 1 then I want…
-
Reference variable in a variable?
Hi, I'm using a loop to manipulate an object. I need each loop to use a succesive element in my JSON data. For example: Loop 0 —> user.preference.0 Loop 1 —> user.preference.1 Loop 2 —> user.preference.2 Initially I thought I could simply use the loop's "index" variable (which tracks the loop's current iteration number) in…
-
Combining JSON data from seperate sources
Hi, I have a table of products and each product gets dynamically priced for the individual user in real time. The price is retrieved from an API call. I'm trying figure out how I can combine the products and the price data into a single JSON response that I can use as an API call. I have attached a screenshot to try and…
-
Add filter to change or replace key names in an object.
The filter should take an object such as {"key1":"value1","key2":"value2", "key3":"value3"} and provide a list of text to replace the key names e.g. ["mykey1","mykey2","mykey3"} and return: {"mykey1":"myvalue1","key2":"myvalue2", "key3":"value3"}. WHY? At times, one needs to provide more descriptive keys to the frontend (a…
-
How can I ensure the create_object filter returns a null value in the object?
I have two lists, key_list = ["a", "b", "c"], values_list = [1,2,null]. The create_object filter will return {"a":1, "b":2}, the entry with null will not be included. What can I do to ensure {"a":1, "b":2, "c":null}?
-
Automating workflow on record creation or update
Hi, I just started using Xano and I'd like to learn if it's possible for me to trigger a workflow on the creation or update of a record in the database? One of my uses cases requires the data in a field to be used in an (external) API call to receive a response that can be saved in another field. For example: let's say I…