svySearch

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Re: svySearch

Postby alk » Tue Feb 28, 2017 8:45 pm

Jepp,

now I have the data at least - thanks for including.

The example-Solution works without problems.....

in my solution I get a different error-warning
TypeError: Cannot call method "getType" of (F:\Eigene Dateien\servoy_workspace_bib\svySearch\svySearch.js#570)
at F:\Eigene Dateien\servoy_workspace_bib\svySearch\svySearch.js:570
at F:\Eigene Dateien\servoy_workspace_bib\svySearch\svySearch.js:677
at F:\Eigene Dateien\servoy_workspace_bib\BIB_Basic\forms\frm_verlag.js:89 (onSearch)

I see now the hint "cannot call method "getType"...
the code is


// SKIP NON-TEXT types for implied search
type = sp.getJSColumn().getType();
if(type != JSColumn.TEXT){
// TODO Warn of implied search for non-text columns ?
continue;
}

Hope this helps you to locate my fault,
do I have to define for any column any kind of definition? Where?

so, I guess we are narrowing the problem..

Will you be at Servoy World? I guess you already earnde a beer..

Thanks Ralf
alk
 
Posts: 61
Joined: Wed May 21, 2014 8:34 pm
Location: Berlin

Re: svySearch

Postby sean » Tue Feb 28, 2017 8:55 pm

HI Ralf,

Do you have any other warning about which column is missing?
I added a warning, so now you should see in Server Log or dev consolse, something like:
Code: Select all
Parse column info failed. No table found for:


and then the table/column which is not found?

And yes I'll be at Servoy World. And yes I do accept bribery in the form of beer ;-)
Software Engineer
Servoy USA
sean
 
Posts: 370
Joined: Mon May 21, 2007 6:26 pm
Location: USA

Re: svySearch

Postby alk » Wed Mar 01, 2017 10:53 am

Good morning,

The errror warning on the console is now:
--------------------------------
WARN Parse column info failed. No column found for: dataSource=db:/bib/verlag, dataProvider=autor
TypeError: Cannot call method "getType" of (F:\Eigene Dateien\servoy_workspace_bib\svySearch\svySearch.js#570)
TypeError: Cannot call method "getType" of (F:\Eigene Dateien\servoy_workspace_bib\svySearch\svySearch.js#570)
at F:\Eigene Dateien\servoy_workspace_bib\svySearch\svySearch.js:570
at F:\Eigene Dateien\servoy_workspace_bib\svySearch\svySearch.js:677
at F:\Eigene Dateien\servoy_workspace_bib\BIB_Basic\forms\frm_verlag.js:89 (onSearch)
--------------------------------
The datasource for the form, which locates the Search field is: db:/bib/verlag
and the first "searchprovider" is 'the tabelle 'autor'

I guess I found my mistake

SearchProvider is not a table (as I thought), but fields = Columns in a table
I tried it and it worked....

But additional question,
how can I search through different tables?
Do I have to change the searchProvider: "lastname" to "autor.lastname" ???

Thanks again for your patience
Ralf
alk
 
Posts: 61
Joined: Wed May 21, 2014 8:34 pm
Location: Berlin

Re: svySearch

Postby sean » Wed Mar 01, 2017 4:37 pm

Hi Ralf,

You can search across tables by using a relation (you must define it first)
i.e.
Code: Select all
orders_to_customer.companyname


Also see the wiki docs on the github page for more info.
Software Engineer
Servoy USA
sean
 
Posts: 370
Joined: Mon May 21, 2007 6:26 pm
Location: USA

Re: svySearch

Postby alk » Wed Mar 01, 2017 5:48 pm

Thanks,
that's it.
At Servoy World my friend "Fritz Maurhofer" will be and wil order the beer, since I am not in Amsterdam

Best
Ralf
alk
 
Posts: 61
Joined: Wed May 21, 2014 8:34 pm
Location: Berlin

Re: svySearch

Postby sean » Wed Mar 01, 2017 6:08 pm

haha sounds good :-D
Software Engineer
Servoy USA
sean
 
Posts: 370
Joined: Mon May 21, 2007 6:26 pm
Location: USA

Previous

Return to Programming with Servoy

Who is online

Users browsing this forum: Google [Bot] and 12 guests