Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 672
  • Last Modified:

Domino/Lotus Notes - How Do I Populate a Field Value Based on a Variable in Another Field

I have charge account fields named "ChgNo1", "ChgNo2", "ChgNo3", and "ChgNo4" respectively. They are editable dialog lists providing the user an option to choose which account(s) should be billed for the transaction.

Based on the account(s) chosen, I would like to populate a field called "Distribution" with a list of names that will later be used to email the responsible department(s) contact(s).

The code I have currently placed in "Standard_21071" is not populating the field. "Standard_21071" is a names, computed field (I've also tried it a couple of other ways). Here's the code:

check := @If(@Contains(ChgNo1; "210-71")  | @Contains(ChgNo2; "210-71")  | @Contains(ChgNo3; "210-71")  | @Contains(ChgNo4; "210-71"); "Yes"; "No");
check = "Yes"; Standard_21071:"Charles Moore":"Willy Gabes";

Also, I would like the formula to do the same for ChgNo1, etc. if it were account "210-80".

Please provide help, thank you.
1 Solution
I would create a test DB and form and test there first.

also see



Do some testing and make sure that you understand the different field types.

I prefer lotus script to formula, since it is easier to debug and gives better control.

I hope this helps !

Sjef BosmanGroupware ConsultantCommented:
Let's split up the code, so you see what happens:

check := @If(@Contains(ChgNo1; "210-71")  | @Contains(ChgNo2; "210-71")  | @Contains(ChgNo3; "210-71")  | @Contains(ChgNo4; "210-71"); "Yes"; "No");
--> let's assume check is calculated correctly

check = "Yes";
--> this statement evaluates to True or False, and the result is discarded

Standard_21071:"Charles Moore":"Willy Gabes";
--> this statement evaluates to a list of at least 3 values, and the result is discarded

--> the result of the last expression is returned as new value of the field; since nothing changed, the field's value wont change

What you probably meant:

check := @If(@Contains(ChgNo1; "210-71")  | @Contains(ChgNo2; "210-71")  | @Contains(ChgNo3; "210-71")  | @Contains(ChgNo4; "210-71"); "Yes"; "No");
@If(check = "Yes"; Standard_21071:"Charles Moore":"Willy Gabes"; Standard_21071)
fselliottAuthor Commented:
Thank you!

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now