Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






Examples: @For

  1. This agent displays the elements of the Categories field one at a time.
  2. @For(n := 1;
    
    n <= @Elements(Categories);
    n := n + 1;
    @Prompt([OK]; "Category " + @Text(n); Categories[n]))
  3. This computed field formula concatenates the list elements in the fname and lname fields:
  4. @For(n :=1; n<=@Elements(fname); n:= n + 1;
    
    full := @If(n=1;fname[n] + " " + lname[n];full : (fname[n] + " " + lname[n])));
    full

    If fname contains: "Catherine":"Patricia":"Maureen" and lname contains: "Rolling":"Kearns":"Legacy", the result is: "Catherine Rolling;Patricia Kearns;Maureen Legacy." If fname and lname each contain a different number of elements, be sure to include the field that has fewer elements in the @Elements function or an "Array index out of bounds" error results.

  5. This computed field formula displays the longest name in a text list of poets names stored in the poets field. If the poets field contains "T.S. Eliot":"Dorothy Parker":"Edna St. Vincent Millay":"e.e. cummings": this field displays Edna St. Vincent Millay.
  6. temp := "";
    @For(n := 1; n <= @Elements(poets); n := n + 1;
    @If(@Length(poets[n])>@Length(temp);
    temp := poets[n];temp));
    temp
Related topics
@For




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009