UNPKG

jsharmony-tutorials

Version:
23 lines 1.2 kB
{ "table":"cust", "layout":"grid", "caption":["Customer","Customers"], "buttons":[{"link":"insert:FieldCustomSQL_Form"}], "fields":[ {"name":"cust_id","caption": "ID","link":"update:FieldCustomSQL_Form"}, {"name":"cust_name","caption":"Customer", "sqlsearch":"(cust_name||' '||cust_desc)", "sqlsearchsound": "cust_id in (select table_id from soundex where table_name='cust' and field_name='cust_name' and soundex_val=%%%SOUNDEX%%%)" }, {"name":"cust_sts","caption":"Status", "sqlsort":"(select code_seq from code_cust_sts where code_cust_sts.code_val=cust.cust_sts)" }, {"name":"cust_start_dt","caption":"Start Year", "type":"int", "sqlselect":"(cast(strftime('%Y', cust_start_dt) as integer))", //Extract the year from the date field "sqlinsert":"(date(@cust_start_dt||'-01-01'))", //Convert the input year ("integer") to a date YYYY-01-01 "sqlupdate":"(date(@cust_start_dt||'-01-01'))", //Convert the input year ("integer") to a date YYYY-01-01 "sqlwhere":"cust_start_dt >= (date(@cust_start_dt||'-01-01'))" //If cust_start_dt is in querystring, display any start date >= the value } ] }