Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Browse Screen: No search results

Questions related to using nuBuilder Forte.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Browse Screen: No search results

Unread post by kev1n »

If you change this

Code: Select all

	if(arguments.length == 0){
		window.nuFORM.setProperty('page_number', 0);
	}
... to this

Code: Select all

	if(arguments.length >= 1){
		window.nuFORM.setProperty('page_number', 0);
	}
it works fine even when 2 parameters are passed to nuSearchAction().

Please also test it.
gerese
Posts: 132
Joined: Sun Dec 16, 2018 6:13 pm
Location: România
Has thanked: 30 times
Been thanked: 4 times

Re: Browse Screen: No search results

Unread post by gerese »

Hi Steven,

With the version published on Sourceforge from 11.09.2020, the search in browseform worked ... with some issue when using nuSearchAction() second parameter .

After update published on 17.09.2020, I have problem with forward / backward scrolling , it always remains on page 1 without anything moving (on form with object, translate, forms ... ).

I applied Kevin's fix https://github.com/smalos/nuBuilder4-Bu ... results.md
and it works now.



PS.: 9-11 ... is not a good day for projects, go away :lol:
nuBuilderForte .... BIG Like !!!
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Browse Screen: No search results

Unread post by admin »

Everyone,

That's done, Thanks.


Steven
benritter
Posts: 49
Joined: Wed Aug 26, 2020 10:38 pm

Re: Browse Screen: No search results

Unread post by benritter »

Hi, think my issue is related to this string. I have a a browse form and it's subform browse both running in iframes on the same page.
looks like this:
Screenshot 2020-10-16 120659.png
The subform search function works fine. But the main browse form search only highlights the matching rows. like this:
Screenshot 2020-10-16 120757.png
How can I make the main browse search behave the same as the subform search?
Thanks!
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Browse Screen: No search results

Unread post by kev1n »

Please show us your SQL.
And enter

Code: Select all

nuCurrentProperties().browse_sql
in the developer console to view the generated sql after performing a search.
(also see here: https://forums.nubuilder.cloud/viewtopic. ... sql#p19114)
benritter
Posts: 49
Joined: Wed Aug 26, 2020 10:38 pm

Re: Browse Screen: No search results

Unread post by benritter »

When the browse is displayed in an iframe, In the console, nuCurrentProperties() .browse_sql returns "null".

When I open the same browse edit form with a button in a new bread crumb, the console nuCurrentProperties() .browse_sql returns this (222 was the search criteria):

SELECT client_id,first_name,last_name,street_address,city,zipcode,cell,home,work,car,food,diapers,diaper_size,wipes,formula,hygiene,client_number
FROM client
WHERE 1; AND ( (CONVERT(first_name USING utf8) LIKE "%222%" OR CONVERT(last_name USING utf8) LIKE "%222%" OR CONVERT(street_address USING utf8) LIKE "%222%" OR CONVERT(city USING utf8) LIKE "%222%" OR CONVERT(zipcode USING utf8) LIKE "%222%" OR CONVERT(cell USING utf8) LIKE "%222%" OR CONVERT(home USING utf8) LIKE "%222%" OR CONVERT(work USING utf8) LIKE "%222%" OR CONVERT(car USING utf8) LIKE "%222%" OR CONVERT(food USING utf8) LIKE "%222%" OR CONVERT(diapers USING utf8) LIKE "%222%" OR CONVERT(diaper_size USING utf8) LIKE "%222%" OR CONVERT(wipes USING utf8) LIKE "%222%" OR CONVERT(formula USING utf8) LIKE "%222%" OR CONVERT(hygiene USING utf8) LIKE "%222%" OR CONVERT(client_number USING utf8) LIKE "%222%") )



Browse SQL for the main form is
SELECT * FROM client WHERE 1;

Browse SQL for subform is

SELECT
*
FROM
(
SELECT
household.*,
client.client_number
FROM
household
LEFT JOIN client ON household.client_id = client.client_id
) T
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Browse Screen: No search results

Unread post by kev1n »

benritter wrote:When the browse is displayed in an iframe, In the console, nuCurrentProperties() .browse_sql returns "null".

Did you switch to the corresponding context (iframe) before entering nuCurrentProperties().browse_sql ?
"Top" is the default (main form), select the "iframe" context.
You do not have the required permissions to view the files attached to this post.
benritter
Posts: 49
Joined: Wed Aug 26, 2020 10:38 pm

Re: Browse Screen: No search results

Unread post by benritter »

Thanks, that is good to know about switching context. And now I can see the results from the browse in the iframe.
BUT, (AAAARRRRGH!) The problem was that, in my browse sql, I ended my query with ";" like a good boy. But then, the sql generated by the search function was all placed after the ";". I deleted the ";" from my sql. problem solved. And I thought I had tried that already.
Thanks for the help!
Post Reply