Browse Screen: No search results

Questions related to using nuBuilder Forte.

Re: Browse Screen: No search results

Postby kev1n » Fri Sep 11, 2020 2:08 pm

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.
kev1n
 
Posts: 1038
Joined: Mon Oct 15, 2018 2:13 am

Re: Browse Screen: No search results

Postby gerese » Wed Sep 23, 2020 12:18 am

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-Bug-Tracker/blob/master/20200826_browse_no_results.md
and it works now.



PS.: 9-11 ... is not a good day for projects, go away :lol:
nuBuilderForte .... BIG Like !!!
gerese
 
Posts: 45
Joined: Mon Dec 17, 2018 2:43 am

Re: Browse Screen: No search results

Postby admin » Tue Sep 29, 2020 9:04 am

Everyone,

That's done, Thanks.


Steven
admin
Site Admin
 
Posts: 3372
Joined: Mon Jun 15, 2009 9:53 am

Re: Browse Screen: No search results

Postby benritter » Sat Oct 17, 2020 1:46 am

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
Screenshot 2020-10-16 120659.png (30.94 KiB) Viewed 51 times


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
Screenshot 2020-10-16 120757.png (24.47 KiB) Viewed 51 times


How can I make the main browse search behave the same as the subform search?
Thanks!
benritter
 
Posts: 33
Joined: Thu Aug 27, 2020 6:08 am

Re: Browse Screen: No search results

Postby kev1n » Sat Oct 17, 2020 3:59 pm

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: viewtopic.php?f=19&t=9875&p=19114&hilit=nuCurrentProperties+browse_sql#p19114)
kev1n
 
Posts: 1038
Joined: Mon Oct 15, 2018 2:13 am

Re: Browse Screen: No search results

Postby benritter » Tue Oct 20, 2020 12:26 am

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
benritter
 
Posts: 33
Joined: Thu Aug 27, 2020 6:08 am

Re: Browse Screen: No search results

Postby kev1n » Tue Oct 20, 2020 1:02 am

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.
Attachments
context.png
context.png (11.85 KiB) Viewed 29 times
kev1n
 
Posts: 1038
Joined: Mon Oct 15, 2018 2:13 am

Re: Browse Screen: No search results

Postby benritter » Tue Oct 20, 2020 2:34 am

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!
benritter
 
Posts: 33
Joined: Thu Aug 27, 2020 6:08 am

Previous

Return to General