Share feedback, ideas and get community help

Home
Members
caiovitr
c
caiovitr
Offline, last seen 3 months ago
Joined September 13, 2024
Hello! Good evening, Typebot community! I am having a certain issue with the declaration of variables in Typebot. I perform a query on my database to retrieve the existing product categories, and right after that, I assign two variables: the first one to store a list with the codes and names of the products, and the other variable to store in an array the number of items that my database query returned (for validation purposes). The real problem: the flow executed on the web works normally, but on WhatsApp, when it gets to the part where these two variables are declared, the user needs to send the response twice for the flow to continue only on the second response. Could someone tell me why this happens? Note: I use this logic twice in my flow, and this issue only occurs in the first part, but not in the second. Attached is a photo of the declaration of my two variables.

I have already tried declaring the variable at the beginning of my flow and calling it at a certain part of the flow in a script block to perform the aforementioned logic, but I do not know how to assign the value (an array with the number of items from the database) obtained as a result of the logic to the variable I declared at the beginning of my flow. In other words, the result only works within the script block but is not recognized outside of this block.
2 comments
B