Normal Topic Whats "FilterValueList" in Erika's example program (Read 1371 times)
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Whats "FilterValueList" in Erika's example program
Apr 18th, 2004 at 12:55pm
Print Post Print Post  
Erika, in your programming example post of filtering an xuserselect list, you use the line:

  vFinalList = FilterValueList(vVals, vSearch)

Where can I learn about the programming command "Filervaluelist". I looked in my manual and didnt see it. Is it a 'prototype' command?

Are there other commands we can use in sesame that are not listed in our manual?

Thanks,
Steve
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Whats "FilterValueList" in Erika's example pro
Reply #1 - Apr 18th, 2004 at 1:03pm
Print Post Print Post  
FilterValueList is not an SBasic command. It is a custom procedure that I wrote and posted. You can find it in the Programming Examples board.
http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=program;action=display;...
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Whats "FilterValueList" in Erika's example pro
Reply #2 - Apr 18th, 2004 at 1:14pm
Print Post Print Post  
Yes, thats were I saw it but I didnt realise that you created a variable called "function filtervalue", Im just used to seeing variables with short names that start with a 'v'.

Thanks for clearing up my confusion, as always!

Steve in Texas
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Whats "FilterValueList" in Erika's example pro
Reply #3 - Apr 18th, 2004 at 1:24pm
Print Post Print Post  
FilterValueList is not a variable. A variable represents a single value of a particular type.

FilterValueList is a function. It is a piece of SBasic code that can be run as often as needed, which accepts arguments and returns a value.

See the section of the Programming Manual beginning on Page 64. This covers user defined procedures (functions and subroutines). Please let me know if you need clarification on this.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Whats "FilterValueList" in Erika's example pro
Reply #4 - Apr 18th, 2004 at 1:33pm
Print Post Print Post  
Oh boy, I skipped that page  Shocked

I'll read up on it.

Thanks again!

Steve in Texas
  
Back to top
IP Logged
 
LindyR
Member
*
Offline


Thanks Lanticans!!

Posts: 16
Location: Beaverton Oregon
Joined: Dec 15th, 2003
Re: Whats "FilterValueList" in Erika's example pro
Reply #5 - Apr 27th, 2004 at 1:40am
Print Post Print Post  
I'm about to sob in frustration!  I've spent the last 24 hours reviewing the manuals (again), researching this forum (again), etc and I have pieces of code all around me, but I don't know where to PUT them.    ???

I'm trying to get a filtered list of company names from a Companies database (part of my ap), based on 2 or 3 letters that I enter into a Company Name field in an Individuals database (also part of my ap).  This would be what I used to achieve in Q&A with xuserselectr, but I'm having trouble coming up with the correct syntax to get the filtering to work.

So now I'm trying to use the FilterValueList function and I have the programming code correct (no errors reported) but -- since I have little clue about programming -- I don't know how to get the hard-coded "op" out of there and have it accept whatever letters I put in. 

Here are my questions (it's difficult to ask intelligent questions when you're as confused as I am!):

1.  Which fields/events does all of this coding belong in?
2.  How do I get the "op" out of the programmed function?
3.  I really want the filter for names BEGINNING with, not CONTAINING (I get lots of words containing op and a little white -- blank -- screen that I have no idea what to do with)
4.  The picklist of company names -- no matter which method I use -- doesn't display ampersands, which a lot of company names do contain.  So then my lookups don't work for those companies.

Please Help!!  <'lil sob>
  

Lindy Robertson&&Beaverton Oregon
Back to top
AIM AIM  
IP Logged
 
TJCajun
Junior Member
**
Offline


"Laissez les bons temps
rouler"

Posts: 72
Location: Louisiana
Joined: Nov 25th, 2002
Re: Whats "FilterValueList" in Erika's example pro
Reply #6 - Apr 27th, 2004 at 2:49am
Print Post Print Post  
   Lindy, I am in the midst of proofing the May issue of Inside Sesame.  ( http://www.insidesesame.com )
  I don't think it's proper for me to say too much about this issue, but I feel certain Marble Publications wouldn't mind that I mention there is an excellent article dealing with Picklists in Sesame in the upcoming issue!  It should help you a great deal with your situation.  Usually, new issues are available for download around the first of each month, but it is possible (not guaranteed) that the May issue may be available as soon as late Wednesday, 4/28/04.  I hope that you are a subscriber to Inside Sesame, so that you can get this issue ASAP!
  
Back to top
IP Logged
 
LindyR
Member
*
Offline


Thanks Lanticans!!

Posts: 16
Location: Beaverton Oregon
Joined: Dec 15th, 2003
Re: Whats "FilterValueList" in Erika's example pro
Reply #7 - Apr 27th, 2004 at 3:09am
Print Post Print Post  
Oh, indeed I am a long-time (and charter) subscriber!  And I always download my copy even before receiving the email notice.  I'll watch for the new issue with bated breath!  Thanks, TJ!  Roll Eyes

My hubby "knows" you as the Tabasco Sauce Guy --  I still have my itty bitty bottles you brought to some of the bashes.  He loves the stuff, but he may NOT open my little bottles!    Smiley
  

Lindy Robertson&&Beaverton Oregon
Back to top
AIM AIM  
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Whats "FilterValueList" in Erika's example pro
Reply #8 - Apr 27th, 2004 at 11:29am
Print Post Print Post  
Lindy,

XUserSelectR should work based on what you describe. If you want the names beginning with "TRA", have you tried something like:

MyVar = @XUserSelectR(@FN, "Companies!Company Name", "Company Name", "TRA", "TRAzzzzzzzzz")

[quote] 1.  Which fields/events does all of this coding belong in?[/quote]
Where you put the code depends on when you want it to run. For example, if you need it to run when you leave an element called "LastName", put it in the LastName::OnElementExit event.

[quote] 2.  How do I get the "op" out of the programmed function?
3.  I really want the filter for names BEGINNING with, not CONTAINING (I get lots of words containing op and a little white -- blank -- screen that I have no idea what to do with) [/quote]
If you still want to use FilterValueList, the hardcoded "op" can be replaced by the element name containing your beginning characters. If this element is called "NameFilter", the code would look like this:
[code]vSearch = NameFilter[/code]

However, FilterValueList is written to find the search value anywhere in  each list value. It would need to be adjusted to search only at the beginning.

I recommend you just use XUserSelectR instead.

[quote]4.  The picklist of company names -- no matter which method I use -- doesn't display ampersands, which a lot of company names do contain.  So then my lookups don't work for those companies.[/quote]
Special characters like ampersands are always a problem. Most Windows controls see an ampersand as a "shortcut" indicator and, instead of showing the ampersand, underline the character following it. If you want to put these values on a picklist, you need to get rid of the ampersands.


  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged