RandyS Posted October 29, 2004 Posted October 29, 2004 Hi all, I'm trying to create a clickable alphabet line such that clicking "A" will return all the company names that begin with "A", "B", "C" etc. What I can't figure out is how to perform such a search. According to the manual the =char* format does this but only for Japanese fields. Surely there is another way. Or do I have to develop my own function that loops through all records and flag the ones that begin with "A" using a text function, then perform a find on the flag? Thanks, RandyS
Ender Posted October 29, 2004 Posted October 29, 2004 Just find for the letter. It assumes you are searching for words that begin with whatever you enter. You could probably do this with 26 buttons using one script. Each button using the search letter as its script parameter. Then the script would look something like this: Enter Find Mode Set Field [ Company Name ; get(scriptparameter) ] Perform Find You may also want to capture the no records found error.
Ender Posted October 29, 2004 Posted October 29, 2004 Just find for the letter. It assumes you are searching for words that begin with whatever you enter. Note that a find for "a" in Company Name would return "Apple Computer" and "Bee's Art Supply". If this is not desirable, then you would need to change the search a bit. Maybe there's a seach symbol that does a 'start with' kind of thing, but I don't know it. Short of that, I'd add a calc field CompanyStartLetter = left(Company Name; 1), and perform the search on it.
MoonShadow Posted October 29, 2004 Posted October 29, 2004 There is a nifty demo The Shadow came up with awhile back which saves layout space and Developer time by eliminating all the buttons and allows alpha jumping forward/back. It might be of interest here: Next Letter The thread starts with jumping every 10 records but, at the end switches to alpha jumping.
transpower Posted October 30, 2004 Posted October 30, 2004 The correct solution is, of course, ==A*, etc.
RandyS Posted November 1, 2004 Author Posted November 1, 2004 Ahhh ... thanks Transpower, that was the tidbit I was looking for. Cheers.
Recommended Posts
This topic is 7590 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now