-
"Database Transaction" functionality
Hi, How does this functionhttps://docs.xano.com/working-with-data/functions/database-requests/database-transaction work if a non-DB function fails? If this happens: Edit record in user table Create a variable test equal to an empty object {} Create another variable equal to variable test.name, which fails…
-
Working with nested arrays
I've come across a strange issue. I have a nested json that I'm using the Arrays function under data manipulation to pull out information using Find All. Works great for first level, but when I include a filter for the second level using dot notation the error I'm getting is it can't find the variable. The data structure…
-
Queue processing best practice
Let's say I have a db of 100k records (users). Every hour I need to pull records from that db that match specific criteria. At some hours this will be 5000 records at a time. Then I need to process those 5000 records in under an hour's time so that it doesn't overlap with the next batch of data. Processing each entry takes…
-
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}?
-
Return one object form array that has matching ID
Hi there I am receiving an array in a response from Stripe - see below. How do I filter the array to return only the object that has an ID matching what I want? I'm sure this is a common ask but I couldn't find an answer searching here. Thanks.
-
Financial Transaction History / Available Balance Calc
Hi all I'm trying to figure out the best way to model a financial transaction history on a per-customer basis. Right now I have a user table and a transactions table. All transactions for all customers are currently in the transactions table. I want to have a running available balance calculated for each customer as each…
-
How can I create an object from two separate lists with repeated items in the key list?
Hi all, I have the following two arrays: [0,0,1,0,0,1,0] and [a,b,c,d,e,f] and I would want the following object: {0:[a,b,d,f],1:[c,e]} That is, I want items in the first array to become the keys (0 and 1) and corresponding items in the other array to become the values. Repeated Items in the key array are will have the…
-
Geography Type - How to populate 762 rows?
How do I populate 762 rows with the Geography type, i.e. not manually. I discovered the Geography type after I read the question from @Josh Nelson . This feature is great and could enhance my application significantly. I have a table called Places - screenshot below. I have the latitude and longitude in separate columns as…
-
timestamp to DATE
hi im triying to generate an api call but as known date fields are always answered in timestamp format , i would like to transform this on the response i know update variable would work but i'm stuck on how it would work on a response that has 5000 answers so i need a function that does this for every object im not using…
-
Rookie Pagination Setup Error
Howdy. I am trying to setup paging on the output of one of my APIs for the first time. I can't figure out what value I put in the 'Page' field when configuring the output. It works if I enter an integer, but obviously I want the API to take the page number that is passed in by the front end, not the hardcoded page number…
-
Paginate Response
Hi everyone, Just wanted to know if there is a quick way to paginate a response. As you can easily do when you query a record table → https://docs.xano.com/working-with-data/functions/database-requests/query-all-records/external-query-manipulation/external-paging I modify and sort my output quite heavily. So querying all…
-
Tuto : How to deal with Multicriteria Update and Create
Dear all, After struggling for some time with the question. I wanted to share the way I managed the issue. Please comment and make suggestion if you have any insights to optimize the solution :) Using array to manage multi-criteria update and creation of data in XANO create an array containing the full content of the…
-
format_timestamp applied at wrong level
I'm trying to format a timestamp using the format_timestamp filter (#1) that is on the output of an add-on and the add-on could return multiple values. Instead of the date at #2 being updated, the function is adding a new date #3. What do I have to change have the date at #2 updated? Thanks!
-
Updating Start and End Dates
Context: Start Date - Timestamp End date - Timestamp I have groups which run weekly. I need the start and end date to update once the current time has passed the end date. Once it has passed, I need to add seven days to the timestamp. How am I able to automate this?
-
Running total
I've successfully used an aggregation addon to recursively query the same table. This means that I can get a grand total in the same response as the query response list. However, I can't get the addon query to include a "< =" timestamp filter, which would provide a running total. I'm passing the auth.id from the API call…
-
Text filter requires a scalar value.
I am trying to delete a record and feed the id from a variable like this: If I run it I get an error: Text filter requires a scalar value. I then tried to enter the id directly as a number and it worked fine. I also tried to do it with a get filter but that doesn't work either. Here is how the variable looks like when it…
-
How to obtain related table data in an Object data type
I have a table 'profiles' which contains a column of object type. This holds 1 or more references to a table called 'clubs'. I want to pull the value of 'ClubName' from table 'clubs' when I fetch the profile records. I watched the video 'Addons: Single vs List Return Types' provided by @Michael Udinski but my case is…
-
Image to Xano database
I'm trying to upload an image to Xano database using Javascript, but the image doesn't seem to be loading correctly onto the database. It can't be something to do with the endpoint, I have already tested it. Here's the code.
-
CSV file data export issue
I have checked csv file snippet it's awesome but i need one more thing Requirement:- When I create a csv file get all data from table so i need nested sheet option also so basically when one file has multiple sheet where we store different different table data in single csv file. It's possible if it's please let me know
-
regex_replace usage
I am trying to mask the first 5 numbers in a string in an API response. There may be non-number characters in this string too. I figure using the regex_replace filter is the correct approach? But can't figure out how to apply it in the UI. Chat GPT tells me that this regex will work - (?<=\D|^)\d{5} - but there are two…
-
Multiple CSV in tar.gz - Is it possible to get data?
If I send a single example.tar.gz which contains 2x CSV files, is it possible to get the data out of those CSV files in Xano?
-
Whats the exact process for accessing the variables returned by Query All Records?
Specifically, id like to create a list that looks like this ['south korea', 'health', '11-100'] from this output
-
How to get the sales per day in xano
So I have a requirement where I want to fetch the sales per day which can easily be doable in sql query. I want to know if there is any way of doing it in xano based on created at. I want to get the response of each day sales. Anyone here for help?
-
"Trim" an empty string out of existence?
Is there a filter that I can "trim" an empty string into null or just completely out of existence? Other than a conditional to handle this and just set the value to null.
-
"Get All Inputs" as raw text
I'm integrating with Segment webhooks. I'd like to implement signature verification according to the Segment docs: To do this, I'm using "Get All Inputs" with encoding set to "none". I'm expecting to get the raw request body, so that I can apply an hmac_sha1 function against it to check the signature that's provided in…
-
it is possible to create a reference point in time using Xano? (chat basic notifications)
Hello, I have developed a chat application and I am trying to implement a feature where notifications are sent when a message is received by the intended recipient. To achieve this, I have two databases - one contains chatroom IDs and the IDs of the two users involved, while the other contains the messages, including the…
-
I need to loop through an array and find the lowest integer from a range of integers.
I'm unsure how to perform something. I receive an array of data from an external API which contains prices. I have no control/fidelity of sort on the array. I need to identify the lowest price (integer) in the array and display this to my front end. I'm really unsure how to achieve this, could you help?
-
How do you use a join in a Query All for an array of tablerefs?
I am trying to use a join that take an array of tablerefs and adds the other tables details so that they can be used in the query versus doing it as an addon. Example: Events table has an artists column that is a list/array of artist_ids that reference their corresponding row in the Artists table. I am creating a text…
-
Sending data back to Bubble too slow
Hi, I have a table that is 10 wide and +-8.8k deep. I have set it up so that I send a request from Bubble to Xano using 1-10 inputs as filters. The respons time in my Repeating Groups is 5-8 seconds and a list that is 292 long (after the filters have been applied). When I do a "Run & Debug" on 1 filter the results are…
-
NOT IN Condition - How do I populate array of values?
Hi, I'm trying to add a NOT IN condition (custom query) using the Expression Query Bulder, but am unable to work out how to add an array of values to complete the expression? Can't see any examples in the documentation? Any time I try I end up with an empty array? Any help would be greatly appreciated. Thanks, Bren