Page 2 of 2
Re: Browse Screen: No search results
Posted: Fri Sep 11, 2020 6:38 am
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.
Re: Browse Screen: No search results
Posted: Tue Sep 22, 2020 4:48 pm
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

Re: Browse Screen: No search results
Posted: Tue Sep 29, 2020 1:34 am
by admin
Everyone,
That's done, Thanks.
Steven
Re: Browse Screen: No search results
Posted: Fri Oct 16, 2020 6:16 pm
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!
Re: Browse Screen: No search results
Posted: Sat Oct 17, 2020 8:29 am
by kev1n
Please show us your SQL.
And enter
in the developer console to view the generated sql after performing a search.
(also see here:
https://forums.nubuilder.cloud/viewtopic. ... sql#p19114)
Re: Browse Screen: No search results
Posted: Mon Oct 19, 2020 4:56 pm
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
Re: Browse Screen: No search results
Posted: Mon Oct 19, 2020 5:32 pm
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.
Re: Browse Screen: No search results
Posted: Mon Oct 19, 2020 7:04 pm
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!