Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stonefield Query GetValuesForField Example
Message
From
17/11/2006 07:57:39
 
 
To
16/11/2006 22:30:52
General information
Forum:
Visual FoxPro
Category:
Stonefield
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01169377
Message ID:
01170635
Views:
11
Hi Jeff.

>Thanks Doug. I was looking specifically for an example of build a filter from the "is one of" results. Below is what I have come up with. This is working, but I'm always open for improvement. Is there a better way for me to be doing this?

This is just off the top of my head, but I think you could simplify the code using a loop instead:
loValues = SQApplication.DataEngine.GetValuesForField('Loan.cStatus','is one of')
if loValues.Count > 0
  lcFilter  = 'LOAN.cStatus in ('
  lcCaption = 'Status Is One Of '
  for lnI = 1 to loValue.Count
    loValue = loValues.Item(lnI)
    lcValue = loValue.Value
    if not empty(lcValue)
      lcFilter  = lcFilter + iif(lnI > 1, ',', '') + ;
        "'" + alltrim(lcValue) + "'"
      lcCaption = lcCaption + iif(lnI > 1, ',', '') + ;
        alltrim(lcValue)
    endif
  next
  lcFilter = lcFilter + ')'
... rest of code
endif
>BTW the Stonefield Query help file mentions the following about a SFQ message board. Is this still available?
>
>A message board for Stonefield Query users and developers is available at:
>
>http://www.contactreview.com/mb/postlist.php?Cat=&Board=stonefieldquery

Contact Review went under earlier this year. However, we're switching to a DNN-based Web site in a week or two which has a message board, RSS feed, and lots of other cool new features.

Doug
Previous
Reply
Map
View

Click here to load this message in the networking platform