Link to home
Start Free TrialLog in
Avatar of onederwomyn
onederwomyn

asked on

How to Create a Pop Up Box for a field with Search Capabilities

I have a few databases that have DB column lookups to populate drop down lists.  The only way users can get down the list faster is to type the first letter.  For instance, if they type C it goes to the C's.  Well, if they type the second letters, say O, it flips to the O's when what they needed was CO.

So, I have a few questions.  Is there a way for it to look for CO in the dropdown or COR instead of C...then to Os..then to Rs?  If not, can I have a searchable dialogue list field pop up?  As in, there are 2000 products and I want the one that starts with COR?  When dealing with huge 2000+ lists, it would just make it easier.

I code in mostly Lotus Script...so, if possible, the solution needs to be something I can do in Lotus Script.

Thanks for any help in advance.
Avatar of SysExpert
SysExpert
Flag of Israel image

Not sure. but I would separate the search from the drop down list
have a search box above the drop down list, so typing cor and Return, only brings up cor in the drop down list.

 
I hope this helps !
SOLUTION
Avatar of mbonaci
mbonaci
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of onederwomyn
onederwomyn

ASKER

Wow...yeah, I will be honest.  That looks intimidating!
It would be nice wouldn't it, though, if IBM would just include that type of things as a field type?  I mean, it has multi-letter lookup for email addresses, why not have it for non address fields?
Whoops... I meant I do most of my stuff in formula language.

I am pretty sure I can use @Picklist, but I have never used it before.  What initiates the @Picklist?  I assume I have to create a new button.  Then, if the field is product...would the code for the button look like this:
product:=@Picklist (yadda, yadda, yadda...I know what goes in these fields)

?
It's just a matter of pasting the code in few places... without LotusScript you're going nowhere with this...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yea, yea, I'll have to agree with you...
I've had a few more checks so it had to be done in LS...
So, put in a search box and then have a dialog list actually be the field that has the values that say @contain "COR" in DBColumn?  Did that make sense?  Hehe.  It is too early in the morning.  I have always just pulled up direct database columns, never filtered them.  Can you use @contains with a column lookup?
Tumting like this, assuming your text-field is called StartsWith:

sw:= @LowerCase(StartsWith);
all:= Lowercase(@DbColumn(....));
sel:= sw+@Trim(@Right(all; sw))

The formula above is not entirely correct, for if you type the complete name of a product, it will not be displayed. But try first if this works so far. I'll think about the improvement in the meantime.
Ahh -- I see where you are going.  I am actually not coding this piece until the weekend, but I wanted to be full steam ahead when I get there...

Thanks for your help thus far, it is definitely appreciated!!
We'll stay tuned!
What about using @SetViewInfo ?  Do you actually have pull up the view, or can you set a view as part of the dialogue box field?  Hmmm...now I am intrigued.  I mean that function does filter by a prompt.
It only works on the current, open view... Furthermore, you'd have to add a column for each number of letters you want to search on (so A, AA, AAA etc.).

I don't know, but I suppose it just might be possible in a @PickList, if you add the @ViewInfo to the PostOpen event of the view opened in the @PickList (which is a hidden view, of course). Seems like a very tricky solution...
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Really?  Because I made a dialog box in 8 and I would type a C, it would go to Cs...then I type an O and it goes to O, instead of going to CO.  I am pretty sure. I guess I will have to double check.  But, hell if list boxes work, that would be fine.  Thanks!
Also, you may need to type fast ....

Ok folks...dialogue list and list boxes don't work.  What does work, however (I played around), is if I choose field type NAME and have it list from a column in a view.  When the box pops us...if you start typing the beginning a search box appears.  It works pretty good.  Thanks for everyone's help.