Dear Federico, I would want to filter based on multiple constraints like goodsid = 101 or 102 or gooodsname = laptop. My Result object could be variable list created out of say Dbi query. I am trying this. findall(goodsinfo{ goodsid:GoodsId, goodsname:GoodsName, term:Term, searchViews:Searchviews },(member(X, Result), X=goodsinfo(101, _, _, _)),Sols), but it does not work. Thanks and Regards, Shrirang Edgaonkar ________________________________________ From: Federico Ferri [federico.ferri.it_at_gmail.com] Sent: 02 February 2015 16:27:38 To: Edgaonkar, Shrirang; eclipse-clp-users_at_lists.sourceforge.net Subject: Re: [eclipse-clp-users] List of Structures use member/2 for filtering? ?- Result = [goodsinfo(101, "laptop", "tablet", "iPad"), goodsinfo(102, "notebook", "pendrive", "tab")], member(X, Result), X=goodsinfo(101, _, _, _). X = goodsinfo(101, "laptop", "tablet", "iPad") ; false. On 2 Feb 2015 at 07:59:42, Edgaonkar, Shrirang (shrirang.edgaonkar_at_nttdata.com) wrote: > > Result = [goodsinfo(101, "laptop", "tablet", "iPad"), goodsinfo(102, > "notebook", > "pendrive", "tab")] ______________________________________________________________________ Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding.Received on Mon Feb 02 2015 - 08:05:14 CET
This archive was generated by hypermail 2.2.0 : Mon Feb 02 2015 - 12:13:24 CET