繰り返しフィールドで、最後の入力値がある繰り返し位置の番号を返します。
入力値のある最後の繰り返し位置番号
- 詳細
- 作者: 宮村 昌一
- カテゴリ: FileMaker Custom Function
- 参照数: 808
- function(関数):
- Sample input(入力例):
- Sample output(出力例):
- formula(式):
/* Return the repetition number of "Last ( Repetition Field )". 最後に入力値がある繰り返しの位置番号を返します。 Author : Shoichi Miyamura (宮村 昌一) Creation Date : August 31, 2021 */ While ( [ @Max = Count ( RepField ) ; @Inc = 0 ; @Num = 0 ] ; GetAsNumber ( @Num ) < GetAsNumber ( @Max ) ; [ @Inc = GetAsNumber ( @Inc ) + 1 ; @Num = Case ( not IsEmpty ( GetRepetition ( RepField ; @Inc ) ) ; GetAsNumber ( @Num ) + 1 ; GetAsNumber ( @Num ) ) // Case ] ; GetAsNumber ( @Inc ) ) // While