Tip

A Faster Alternative To Using A Dblookup

If you want a certain value to display based on what a user selects in another
field, most of the time this can be done easily with a dBLookup, but sometimes
there can be a significant delay if the database is large. In order to speed
this up, you can compute the lists available to the user in the PostOpen event
to make them available on the new document being created and then use the
@Member function.
Country_Names : This field contains a list of Country Names (i.e. Canada,
United States, England). Hidden, computed field. Can be calculated during the
PostOpen event for the form based on the user, role or some other criteria.

Country_Desc : This field contains a list of corresponding descriptions for
each Country (i.e. Great White North, The Land of the Free, The Home of Royalty
and Boiled Food ). Hidden, computed field. Must be computed based on the same
criteria as Country_Names in order to contain the corresponding descriptions.

Selected_Country : Keyword field with the following formula for the list of
keywords : @Trim(@Unique(Country_Names))

Display_Country_Desc : Computed for Display field with the following formula :
index := @Member(Selected_Country; @Trim(Country_Names));
@If(index = 0; Display_Country_Desc; @Trim(@Subset(@Subset(Country_Desc;
index); -1)))

This was first published in November 2000

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.