-
Edit all users of a table with a single DB query [EDIT ALL RECORD]
Hi, I'm setting up a cron-job where every week I would edit the field counter of all users back to zero. I wouldn't like to do this with a FOR cycle because Is probably not ideal and not fair for some users to get the counter to 0 prior to others, I'd like to do this with a simple DB query, is that something possible with…
-
What are common reasons that would cause a background task to timeout?
I am running a task using pagination and streamining to loop over 166,000 records and modify a field. The task is timing out after around 4 hours and then continues to run consume DB resources for some period of time. I am making 0 external API calls so I cant guess what I'm timing out. Is the total time a task can run…
-
Data is being removed on Edit Record
I'm having a weird issue where I have some data nested 3 levels deep in an object but it's being removed when I use Edit Record that updates unrelated property. Example (liked is the object holding items array and collections object):
-
in an array which filter should i use to find the ith element
in an array retrieved from filter a db i want to get the ith element. Which filter should I use? I have seen entries findIndex, not sure.
-
Text break variable
Hi, I have a text (a cookie) that I wish to use in an API call header, but whatever I do, this code break the variable it's in or doesn't show up in my API call headers. Here's the text / cookies:…
-
Why is it asking me to upgrade my plan if I'm only editing current data?
Also, this is how I correctly edit it right? The documentation says you need to match the id integers or else it will add the column and not edit the current one.
-
How to extract a section of a URL?
I'm positive Xano has an easy(ish) way of doing this, but I just can't land my finger on it. I have a list of Amazon URL's that I'm needing to extract the ASIN values from. Luckily, in this list Amazon always has the ASIN following the /dp/ folder. See here: I'd like to avoid using regex as much as possible here, but with…
-
How to correctly save Markdown in Xano Database?
I am trying to save markdown in a textfield in Xano and render it in React with react-markdown. If I copy my markdown into the text field it does not get rendered correctly. If I hardcode the same markdown and use it as input for my Renderer it works just fine. I don't have any filters on the text field in the Database. I…
-
Table Reference for multiple tables
When you have an integer, you're able to link it to another table as a table reference. Technically speaking, it's just an integer, and if I want to, I can link it to multiple tables if I need to? Example below, with the following Tables: Posts Birthdays Comments Both Posts and Birthdays can have comments, so under Table…
-
Step by step to save an image and get it's xano url?
Feeling extra dumb today so i hope someone can help spell this out for me. I went through this document and it's still unclear to me how to save an image to the database from an API call coming from Draftbit, and then get the URL of the saved image to use in a function. I also don't understand what's arriving in the file…
-
check if variable value is a valid date
check if variable value is a valid date This method available on xano? thank you
-
Anything similar to "CASE" as SQL instead of a lot of IFS
Hi, I am using in a POST request a lot of "IF" conditions to cover 5 scenarios. Is there a better approach than using 5 scenarios, using some sort of CASE as we have in SQL? My examples of conditions are: IF GENDER = M AND COUNTRY = B THEN ELSE IF GENDER = M AND COUNTRY = A THEN ELSE IF GENDER = F AND COUNTRY = B THEN ELSE…
-
Activity Feed: List of last activity by each user - most efficient way?
I have a list of Activities performed by multiple users. A user can perform multiple activities in a row. I want to return a list of that contains only the latest activity by each user in a list. Last Activity by User 1 Last Activity by User 2 Last Activity by User 3 Given there could be many thousands of entries, what…
-
Function to return empty
I have a GET that returns a list and I want to set it so that it would return empty if a certain circumstance is met. I will use an IF and how do I push the empty return?
-
Sending an image in an email using sendgrid
I'm using the file resource input field to send an image to xano, which I then want to send in an email alongside a message (as an attachment or in the message body).[image.png] 1. Do I have to save it to the database to pass it into the email? 2. Is there a way to add it as an attachment? 3. If I can only add it to the…
-
Can i run a background task timing based on relative data or database variable?
Just in case there is a better way to do this all together I'll spell out what I'm trying to do and then ask my specific question. I have a table of users, each has an allotment of 3 posts per day, saved as post_count in the user table, when they post it gets incremented down, when it is zero, they can't post again until…
-
removing an element from an array passed into a function
i am passing an array to a function. Inside the function i want to remove a particular item from the array and then pass it back. There is more logic to it but in essence. I am trying to use update variable with remove filter but that only shows me those variables defined locally to use for the array. I need to use the…
-
Replacing several words in a field
Hi, I am trying to create an app that replaces bad words with the right word. Say "Sh*t" with "Poop" 😀 So as the example, control the swearing. I know I can make it using a Query all records and then using an IF to replace each word, but I have 10 words to check and end up having a lot of Else Ifs. Wondering if there is a…
-
Converting unicode text to ascii?
I have a table of world cities (Thanks Chris for helping with the csv upload!). I need to concatenate a few fields together to make a lookup key so that I can capture data from a webhook. The problem is the world cities province field is not ascii characters, rather it is unicode. Is there a way to convert unicode to plain…
-
Generate list of events by day
I’d like to convert an list of events to a list of dates that contain the events happening that day. I’m not sure the best method.. [ {Event 1, Date 1}, {Event 2, Date 1}, {Event 3, Date 2} ] to [ {Date 1: [ {Event 1}, {Event 2} ] }, {Date 2: [ {Event 3} ]} ] Thank you!
-
Leaderboard
Hi there, I am currently working on a game app and going to need a leaderboard. Is it possible/ is there a function where I can efficiently get the users rank without building loops with counters that I increment? Thanks in advance :)
-
Is there a "strrev" function which mirrors the text?
I have a number let say 12345 and I want to revert the order of chars so that the result would be 54321 - any way to achieve this?
-
Transform number into date
New here so bear with me! I'm trying out WeWeb as my frontend builder and noticed when I pull in dates from xano, they appear has a number. From what I can tell, it seems best to transform the date to MM/DD/YYYY in Xano first and then call it over to WeWeb (I may be totally wrong here)... As for the data I'm displaying in…
-
Best way to do group by/ aggregation in xano without using addon?
I am new to Xano and this seems to be something that should be very easy to do but I am having a little trouble doing this. I tried searching community and documentation but not able to find an answer which doesn't use the addon. Any help is appreciated. I have a table which has schema like this city,item_name, item_state,…
-
(Untitled)
I have an API that pulls peoples' daily entries for various symptom pain levels. Each symptom is rated on a score from 0-8 (called ECOG) Here's a sample of what the data JSON looks like. The average user will have ~10 different symptoms tracked over several months. Objective: How do I filter for the top 5 symptoms with the…
-
Bubble Encrypt > Xano Decrpyt
Hi community I need the assistance of someone who understand encrypting and decrypting better than me I have been collaborating with Lindsay Smith (https://www.knowcode.tech) whom has developed a bubble plugin AES 256 encrypt tool - and has now modified it to work with the XANO IV (nonce) set to 12 instead of 16. However -…
-
Regex_get_all
Ok so i'm a super noob to regex, but i found a link that helped me match the expression i'm looking for. However, when i feed the expression into xano, it doesn't work. I think the ^ requires 'gm' flags and isn't usable with Xano's regex_get_all... Any help making this work would be amazing. Here's my expression…
-
Table Ref
Hi, I am having a table ref from an entries table linking to a currency table, and when I run the query I get the following error message Invalid cast: "("merchant_transactions"."xdo"->>'currency_iso4217_id')::bigint" is of type:"tableref", but trying to be of type:"json" [Screenshot 2022-08-29 at…
-
Optimized read JSON
Hi, Underneath a screenshot of a JSON message. The contactinfo may have an e-mai or telephone, but this optional. I can loop through contactinfo and fill a variable with mailadres and telephone. After the loop I can add a record to my database and use this variable. I want to add a record with separate mail en telephone.…
-
Can I exclude some rows with join?
Hi I have a query from which I want to exclude records based on certain condition. for example, I have a list of events and I want to exclude those events which are already followed by the user (I have follows as separate table with reference to user and to event). So my idea was to join the follows table with condition…