It seams am a heavy case
I downloaded again the example solution and imported it.
I was asked to import data and during importing I get this warning
- Warning.JPG (22.96 KiB) Viewed 8580 times
I said "ok",
Here a screenshot from pgadmin:
- pgdamin.JPG (38.27 KiB) Viewed 8580 times
but all tables like "order_details" are empty
- pgdamin-2.JPG (31.02 KiB) Viewed 8580 times
So now my complete code for OnSearch, etc.
/**
* @type {String}
*
* @properties={typeid:35,uuid:"DB950707-C0D8-402D-A2BC-F98E813413CB"}
*/
var searchText = '';
/**
* @properties={typeid:24,uuid:"DB3765B8-785D-4533-9A21-3DAC5CEEE6AE"}
*/
function onSearch(){
// load all records when search is cleared
if(!searchText){
foundset.loadAllRecords();
return;
}
// create search object and add search providers
var search = scopes.svySearch.createSimpleSearch(foundset);
// set the search text
search.setSearchText(searchText);
// list of data providers to include in search
var searchProviders = [
'autor',
'titel',
'verlag',
'verlagsort',
// related data providers
//'orders_to_customers.companyname',
//'orders_to_employees.firstname',
//'orders_to_employees.lastname',
// N-levels depth on relations
//'orders_to_order_details.order_details_to_products.productname'
];
// add search providers
for(var i in searchProviders){
search.addSearchProvider(searchProviders[i]);
}
// add order date as an explicit search
//search.addSearchProvider('orderdate')
// .setAlias('ordered') // specify the alias which may be used
// .setImpliedSearch(false) // specify that the column is not searched unless explicitly specified
// add freight as an explicit search
//search.addSearchProvider('freight')
// .setImpliedSearch(false) // specify that the column is not searched unless explicitly specified
// add product status, use substitutions to parse display values for integers
//search.addSearchProvider('orders_to_order_details.order_details_to_products.discontinued','product-status')
// .addSubstitution('active',0)
// .addSubstitution('inactive',-1)
// execute search
search.loadRecords(foundset);
application.output(databaseManager.getSQL(foundset));
application.output(databaseManager.getSQLParameters(foundset));
}
/**
* @properties={typeid:24,uuid:"7866937F-8589-4C20-9BBD-916379E98643"}
*/
function onSearch$basic(){
scopes.svySearch.createSimpleSearch(foundset)
.setSearchAllColumns()
.setSearchText(searchText)
.loadRecords(foundset);
}
/**
* @properties={typeid:24,uuid:"99112917-1AEB-41F6-A5ED-EC4293DB1FA6"}
*/
function onSearch$caseInsensitive(){
var search = scopes.svySearch.createSimpleSearch(foundset)
.setSearchText(searchText);
var searchProvider = search.addSearchProvider('kuenstlerart');
searchProvider.setCaseSensitive(false);
}
/**
* @properties={typeid:24,uuid:"691E0656-E4F0-4BCF-866E-157F492FB883"}
*/
function onSearch$explicit$dateFormat()
{
// create the search
var search = scopes.svySearch.createSimpleSearch(foundset)
.setSearchText(searchText) // set the search text
.setDateFormat('dd.MM.yyyy'); // Set the date format which is used
// add order date as an explicit search
//search.addSearchProvider('orderdate')
// .setAlias('ordered') // specify the alias which may be used
// .setImpliedSearch(false) // specify that the column is not searched unless explicitly specified
// run search
search.loadRecords(foundset);
}
/**
* @properties={typeid:24,uuid:"3AABF4A7-0089-4347-8559-F163B5EF40D1"}
*/
function onSearch$substitutions(){
// create the search
var search = scopes.svySearch.createSimpleSearch(foundset)
.setSearchText(searchText) // set the search text
//search.addSearchProvider('shipcountry')
// .addSubstitution('fr','France')
// .setAlias('country');
// execute search
search.loadRecords(foundset);
application.output(databaseManager.getSQL(foundset));
application.output(databaseManager.getSQLParameters(foundset));
}
To complet the story
a) the structure of the table "autor"
CREATE TABLE public.autor
autor_id character varying(36) NOT NULL,
alt_au_id integer,
nachname character varying(40),
vorname character varying(40),
erfass_dat date,
aender_dat date,
name_match character varying(90),
CONSTRAINT autor_pkey PRIMARY KEY (autor_id)
b) the structure of the taabke "verlag"
CREATE TABLE public.verlag
verlag_id character varying(36) NOT NULL,
alt_vlg_id integer,
verlagsname character varying(60),
isbnkurz character varying(12),
erfass_dat date,
aender_dat date,
CONSTRAINT verlag_pkey PRIMARY KEY (verlag_id)
Sean, I really apprciate your time and help....
Sorry for the long post.
Thanks a lot
Ralf