Jump to content

This topic is 5526 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

I am attempting to create a rolodex-style layout for my Customer data.

I've created a key field that explodes Customer::LastName into an array

ie. LastName=Smith

S

Sm

Smi

Smit

Smith

On my Rolodex layout, I have a foreign key field where the user can type the customer's last name, and the related portal will show a list of customers:

ie. If I type "Mc" in the foreign key field,

the portal lists:

John McCluskey

Eric McDougal

Mary McMasters

Here's the rub. The portal does not update until I tab out of the foreign key field. What I want the portal to do is update the data as the user types into the foreign key field, without having to tab out. So as the user starts typing M, the portal shows all last names starting with M, then Mc, then McC, etc.

I tried to write a script using OnKeystroke with no success.

Any ideas?

Edited by Guest
Posted (edited)

Why?

Exploded arrays are dead. Type-ahead finds using script triggers are more likely a better choice.

Edited by Guest
Posted (edited)

What is a type-ahead find? Can you elaborate on this?

It goes something like this.

Create a new layout for the user to use as a search screen (usually presented in a new window to avoid interfering with the user's current found set.).

Have at least a Header part and Body part.

View it as List.

Put at least one global text field in the Header for the user to type in the search criteria.

Have a button in the Body for the user to choose a record.

Be sure to put a Cancel button for no selection.

Using a script trigger on the global field, update the found set of records by performing a search. The type-ahead comes in if you have the script trigger activating with each keystroke. Your search can use the global field value plus an asterisk to match records that start with the value. (This saves you the effort of exploding.)

Edited by Guest

This topic is 5526 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.