Keyword Choice Refresh Formula

Keyword Choice Refresh Formula

In most of the applications we use dbcolumn and dbLookup. There is a small
issue when we use DBlookup in editable keyword field. The Field value ( field
with using DBlookup formula) will not get refreshed even if key field value is
changed. This may cause invalid value selection by the user. To overcome this
normally we write script in field exiting event/ input validation. Here is a
simple way to achieve this using formula. Formula given below should be used in
the field that uses DBlookUp Formula for choices.
Explanation


FldDbColumn - Editable keyword Field that stores the key for dblookup
FldDbLookup - Editable keyword Field that uses DbLookup Formula for choice list


Select Refresh Fields on keyword change proprty for field "FldDbColumn" and
Refresh choices on document refresh property for field "FldDbLookup"

Formula
REM "Your View Name Here";
LookupView := "K1";
REM " Your Look up key Field ";
LookupKey := FldDbColumn;
REM " Lookup Column number. IF u want to use a field name for return values,
then enter field name in quotes ";
LookupColumn :=2;
REM " name of the current Field";
CurrentFieldName := "FldDbLookup";
REM "Current Field Value
CurrentFieldValue := FldDbLookup;

Temp := @DbLookup("":"NoCache";@DbName;LookupView;LookupKey;LookupColumn);

@If(@IsError(Temp);@Return(@SetField(CurrentFieldName;""));@IsNotMember(CurrentF
ieldValue;Temp);@SetField(CurrentFieldName;"");"");

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.


Temp

This was first published in November 2000

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.