Data Access Worldwide Knowledge Base

Article ID 2324
Article Title HOWTO: Build a selection list with record filters
Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2324
KBase Category VDF12
Date Created 06/13/2007
Last Edit Date 11/12/2009


Article Text
QUESTION:
We use a system similar to the order entry sample. What I would like to have is a selection list that shows all customers that have orders and where the amount of order detail lines is more than (lets say) 5. But a different selection should be possible too. Can we achieve this somehow with a constraint?

ANSWER:
There are several ways to achieve this:

1. Use a constrain AS with a user defined function that returns true when the record needs to be present in the list. See the modified customer.sl in the links below.

2. If you make use of an SQL database, you can setup an SQL script that selects the records. You can make an SQL view with this selection statement and bind the view to a table in your Visual DataFlex environment.

3. Create a specialized dialog that uses a grid and custom routines to filter the records that you want to use. See the CustomersWithOrders.Dg in the links below.


Contributed By:
Vincent Oorsprong
Company: Data Access Worldwide
email: vincent.oorsprong@dataaccess.eu
Web Site: http://www.dataaccess.eu

Web Links Related to this Article
File Customer.sl
URL=http://www.dataaccess.com/KBasePublic/Files/2324.Customer.sl

File CustomersWithOrders.dg
URL=http://www.dataaccess.com/KBasePublic/Files/2324.CustomersWithOrders.zip


Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.