Single query's column's columns have no values

Hi, I have created a server connect logic using a single record query to supply values to an email. However, column values from the query are blank in the email. My setup is…

The query uses the post email variable as the condition

The email is set up to show each value

image

But in the resultant email shows only values based on POST.email , not those based on qUser.email

image

I have referred to the tutorial on single query and followed it diligently, there are many more values from the query that I need to use in the email content, how do I do this?

Hi further to the above, I deliberately edited the email address in the database so that the above condition would return False. It did not.

I change the condition to

image

it still returned true. How do i test whether a single query returned a row or not?

Select the row id then == null

Or != null for when it returns something

Hi.
Try disabling the condition and see the output of the query.
I usually put in query1.somecolumn in the condition. If there is a row, it will have some value, hence true, else this expression will be null, i.e. false.

Hi Sorry, that works beautifully in the condition, thank you, that is one problem solved.

The next problem is that the query is actually not returning anything, despite what I said before.

Note: The validate action in my logic setup does indicate that there is a row present, when searching by email, which is correct.

Hi Sid

How do you see the output of the query, I have been searching for a way in the server side, but cannot see a way including looking in Inspect in Chrome

In chrome it’s under network XHR don’t forget to put the output on so you can see what it returns on each set value

In addition to what has already been said, a useful feature in case you haven’t discovered it yet is:

image

Its usefulness will depend on how the query is generated but I often find it helpful for checking and debugging queries. If a query requires GET parameters, you can of course add them manually to the page while testing. In your example above, you could temporarily disable the conditon, to focus on the query.

Hi Sorry
In Inspect, I get under XHR/ response…

But the long string is a json that contains the query definition but no data. If the query was working properly, would you see the data here as well?

Turn off the debug checkbox for your query step in the server action please.

Yes, what a difference a little tick box makes.

Data does now show up in the json in the XHR/Response

The email now successfully gets values values direct from the query.

image

It works!

1 Like