[Bond-users] Filtering the output

Colin Close itchka at compuserve.com
Mon Jul 1 04:19:04 EDT 2013


On Sunday 30 June 2013 14:50:21 Vladimir Voznesensky wrote:
> Hello.
> 
> May Bond form an output of SELECT with a variable list of WHERE
> conditions? This list may be formed by, say, a set of checkboxes: each
> checked checkbox enables some condition.
> 
> Thank you.
> 
> - VV
> 
> _______________________________________________
> Bond-users mailing list
> Bond-users at lists.hcoop.net
> https://lists.hcoop.net/listinfo/bond-users

Hi, I have done someting like this with a kind of switch with SQL CASE and 
widgets as below. This one selects different data sources but I suppose you 
could use it in other ways. 

 SELECT vlinsupd(&apos;visit_list_<field 		
dbobjectsrc="svp_period">svp_now</field>&apos;,
CASE WHEN (select chgflag from ctlflgs) =&apos;t&apos;
THEN <field dbobjectsrc="curr_vst_lst" nullalternative="1001">vst_key</field>
WHEN (select manflag from ctlflgs) = &apos;t&apos;
THEN <widget nullalternative="1001">client_entry</widget>
WHEN (SELECT vduflag FROM ctlflgs) = &apos;t&apos;
THEN <field dbobjectsrc="visits_due" nullalternative="1001">c_id</field>
WHEN (select stdflag from ctlflgs) = &apos;t&apos;
THEN <field dbobjectsrc="std_visits" nullalternative="1001">std_cli_id</field>
<!--HERE insflag-->
ELSE 1001 END

Best,
Colin Close



More information about the Bond-users mailing list