-
Parsing Object with Quotes into Array
My frontend is providing me with this: { "2": { "domEvent": {} "value": [ 3, 4, 5 ] } "3": { "domEvent": {} "value": [ 7, 10, 11 ] } } I'm trying to get the values as a list. What sequence of filters would I need to use to transform this into an integer list / array of [3, 4, 5, 7, 10, 11]? These are coming from a sidebar…
-
How do I use a Precondition with an Array?
I'm trying to write some permissions into my application, simply put getting a list of users who are allowed to edit a record. I have a basic list of users stored in array who have access, and I want to enforce a precondition that says if the users_id trying to edit the record is in the array, then they can edit. The…
-
How to push/remove a value in the list while editing the record in 1 step?
Hi I am new to Xano. So this might be a stupid question. But I didn't manage to find a good answer online. I have a table "files" with column "variants" that is a list of integers. I want to remove/push the value in this list. Right now, I need to do 2 steps Get a record to basically get the current list ("variants_id")…
-
Getting an error when trying to add a very long array.
Hi there. Getting this error: Trying to add this like array more than 3000 items: It works when I try to add an array when 2731 items are inside, but 2732 items retruns the error above. Im trying to add a geo_linestrings object. Did i reach xano limits? More photos for context:
-
Array data
Hi, I'd like to get the values (2,6,7,3, etc) out from the data[] section of a variable that looks like this, and can't figure out a way. Please help. Thank you. [{index: 0,data: [[2,6,7,3,1,1,1,1,1,1,... +93 more]]}]
-
'Add to End of Array' is adding an Array to the end of an Existing Array
Hello, I have an existing array, which is labeled "ShowHostArray" below. When I add an integer to that array, it adds another array, which ultimately breaks my schema. Any thoughts on how to fix this?
-
Provide a meaningful key name when adding to the end of an existing array
Hi Xano community! I have hopefully a simple question. See below image. Currently, I add a variable to the end of an existing array but when it's added the key name is 0. Is there a way to give the key name a proper name so that I can easily reference it on my front end application? Thank you, Tim
-
Get request with Array Query works in debugger but not in live
Hi, Been trying to figure this out for a while now, I have a get request that has an input for an array in the debugger it's passed like this { "color_in": ["Red","Green"]} And when I try to do the same in postman it doesn't work, and I tried all different alternatives but nothing it only works in postman if I try it with…
-
Exception: Param: transactionAmount - Text filter requires a scalar
Hello! I am trying to run a loop to save multiple records from an external API to my DB. When doing an API call (without loop) it is workign fine and returning all data. (screen 1) Once I add the loop it runs into an "Exception: Param transactionAmount - Text filter requires a scalar." The custom function is the working…
-
How to update the value of object
Hello, ran into a strange issue while using an external API, { "id": 1, "lat": 55.082226, "lng": 22.76919399999946, "rank": 2 }, { "id": 2, "lat": 55.082226, "lng": 22.76919399999946, "rank": false } This is the response that I get, and in my database, I have 'rank' field as an integer. Is there a way to replace those…
-
Append suffix to integer value inside object array
Hi community, I'm currently working on this workout logger app, where frontend sends repetitions and weight values in the form of integer to Xano. The issue I'm having is, that I would like to add a measurement unit suffix to the weight value received from the frontend. Ex.: Frontend send to Xano: 99. Xano returns to…
-
Update specific items in an array
Hey, I have watched a few of the Customer Corner videos now re updating/editing arrays through the API, but I'm struggling to apply them to my situation. I've recorded this loom, but will give a quick overview here too: The frontend user I have a page in my app where users can update the 'Core' for their brand, e.g. the…
-
Querying a Database for Matching Element in Array
I have a large database. One of my fields is an array of text. I could easily juggle it around to be an array of objects or an array of some other type if it helps. I am wondering how to query the database to return only records that contain a defined search element. For example if a record had array: [text, dog, cat,…
-
Problem with non-input array parameters
I have two tables. Table 2 has a one-to-many relationship with table 1. Edit query table 2 has an optional parameter with this connections array. When I try to update the data in table 2 and don't enter this parameter, I expect the parameter to become null, but the test shows that Xano makes it an empty array. Main…
-
Return an ID each time a value is found in a object array from an array
Hi there, I know it's possible but can't get my mind into it: I am quering a database to have all the result matching a specific request. It comes out as an array (list of results). In this array, there is this "selected_club" section that has a specific array of objects I am interested in, I would like to see if my…
-
Filter objects in an array
Hi, I am getting an array of products (json objects) as response from an external api call: Example: products = [ { id: 1, name: 'Product 1', price: 9.99, description: 'Description of product 1' }, { id: 2, name: 'Product 2', price: 19.99, description: 'Description of product 2' } ] I'd like to create a new array…
-
GET request from Weweb not working
My frontend on weweb is sending a GET request that takes 5 arrays of integers and a string. Endpoint If I send this from Weweb, on Xano I'll get this error: "Value "3,4,5,6" is not a valid integer" (that are the values of the first input array, that is actually containing integers) While by doing the same request from Xano…
-
Get specifics fields listed in an array from an external API response
Hello, I tried to map some fields with one of my databases who are listed in an array in an API response. The API response return me a list of entity with basics fields but 23 more fields are listeds in an array. I can identity the fields i need with a name or an ID and then return the vaue of the field. (As you can see in…
-
How do I keep the extra whitespace when using substring when looping through an array?
I have a sample file above that is downloaded and parsed in xano. I will get “RECORDS” and save it as “Row1”, the client data as “Row2”, and “END” as “Row3”. Now I'll loop through Row2 per client. I did this by slicing the client data as “Row2” so I can loop through each client data. The client data is separated by a new…
-
Creating a dynamic array to populate multi select field
I have a search form that has a multi-select field for location, in this case US states. Users can select one or more. What I was considering was querying my listing table to create an array list of the states currently represented by active listings. Example is I have 10 listings in California, 5 in Florida, 2 in Texas.…
-
Xano adds empty items ID=0 to array instead of leaving it empty []
My record has column "folders" which is array of IDs. I need to leave it empty if no ID is added, but when I send empty array in my variable with POST enpoint it adds zero-ID record to array [0] but should be empty. Here is example if I create record manually in table with no items added (0) and when i create item on api…
-
Xano sets array input with an array containing a 0 instead of leaving it empty
Our table has columns with int array table ref fields that are not required . When we create a record with these configurations from our front end ( jetadmin) and send a json object without that specific input (as it should be non-required), Xano fills these specific fields with an array containing 0 instead of leaving it…
-
Basic (I think) question on importing an array from one table to another
I am stuck on importing some arrays from Bubble into a Xano table. I understand that Xano CSV import does not handle arrays/lists. So I first imported the relevant arrays into Airtable and then from Airtable into a separate 'imported table' in Xano. Now I want to import what is in the array fields in the 'imported table'…
-
Select entries with empty array field
Hi, I have a table which has a field "tags" which is a list of tags from another table. Now I would like to have a query which loads all entries without any tag (tag count = 0) I tried it with a length filter and a condition to 0: Unfortunately this throws the following error: Whoops! An error occurred.…
-
Manipulate results to group by value
Hello fellow Xano enthousiasts, I am stuck with manipulating results from a database to make it easily usable for my frontend. The current result I am getting is attached as an image below. What I would like is to group all the results by category as a separate array. So basically an array for 'Time' would contain all the…
-
Bug in the new UI update
I like it that is intuitive and I didn't get confused a bit from the change. However, I'm trying to apply a "Find all elements" fuction in the stack and it doesn't show up. But when I run the endpoint it asks me for that input so it's there, just not showing up in the interface.
-
Remove the first 3 objects in an array
I have 10 objects in an array and i want to remove the first 3 object in the array without any condition. How do i do this ? i've search the docs and forum but could not find the solution.
-
array filter to perform regex
Trying to filter array of objects to return a subset where a string property matches the regex. i am using a filter function on array and in the lambda I have the following but i am having problems getting Objects like RegExp or string methds like match to work var mystr = $this._tags.tag_name.matches; const re = /^[^\$]/…