Hi all, just moved over from Bubble (I have a few apps on there and looking at transitioning them over as I’m started to get a little frustrated being locked into the platform)
Been having a play about with Wappler for the last few days, and everything seems all good so. Thank you to the guys who have made some great tutorials.
I’ve followed the guide (Show a Message when Query Returns No Results) on showing a message if the results from the database are empty, this works as I expected. I’m trying this out a page that is already loaded and querying the db from a text input. The message is defaulting to showing before the database has been queried (not sure how this is working) but I presume it’s because as the query hasn’t been run, there are no records.
Does anyone have any idea how I can get around this for example, once button is clicked and a query is executed, if there are no results don’t show message, if there are no results then show message, but don’t show message until the query is returned
Hello,
Is your server action, with the database query not auto executed on page load?
Or are there no records displayed, as the database is filtered by a text input and initially it is empty?
@Teodor thanks for the fast reply! A the moment I’ve set it up so that the database is queried when clicking a button and this takes the value from the text input. Thank you
Sorry should explain this a bit better. I have a text input that queries a table to return a value to fill out one text box. If there are no results returned I would like to display ‘not found’ and if there are results to show ‘successful’.
Then you can add the server action status in the same show/hide condition, used to check the query. It’s available in the data picker, it should look like: serverconnect1.status != 0 && !serverconnect1.data.query1.hasItems()