Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

browse screen search not working

Questions related to using nuBuilder Forte.
Locked
amit
Posts: 36
Joined: Sat Jun 02, 2018 1:26 pm

browse screen search not working

Unread post by amit »

Good day!

This is my sql that works just fine in a browse screen but what doesn't work is the search, it won't find anything. Just an empty table is shown. Am I missing something here?

SELECT
*
FROM (SELECT
t.*,
cu.client,
mgr.name AS manager
FROM t
LEFT JOIN cu
ON t.id = emp.id
LEFT JOIN cu AS mgr
ON cu.mgr_id = mgr.id
WHERE (f = ''
AND (usr = '#USER_ID#'
OR f <> 'globeadmin'))) T
ORDER BY d DESC
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: browse screen search not working

Unread post by toms »

Amit,

Add a WHERE 1 as shown below. This is required for the "query parser" to work correctly.

Code: Select all

SELECT
*
FROM (SELECT
t.*,
cu.client,
mgr.name AS manager
FROM t
LEFT JOIN cu
ON t.id = emp.id
LEFT JOIN cu AS mgr
ON cu.mgr_id = mgr.id
WHERE (f = ''
AND (usr = '#USER_ID#'
OR f <> 'globeadmin'))) T WHERE 1
ORDER BY d DESC
amit
Posts: 36
Joined: Sat Jun 02, 2018 1:26 pm

Re: browse screen search not working

Unread post by amit »

It works! Your trick did the job!
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: browse screen search not working

Unread post by admin »

.
Locked