<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hallo,
Ich versuche, mehrere Formelspalten zu erstellen, indem "Spaltenname" und "Formel" als Argument für die Funktion einer verschachtelten for-Schleife übergeben werden, die eine Liste mit einer Liste durchläuft, die diese beiden Werte enthält.
Funktion:
add_col = Funktion ({ col_name, col_calc } , Anzeigen (col_name, col_calc);
cal_2 << Neue Spalte ( col_name, Numerisch, Fortlaufend, Format ( "Best", 12 ) ,Formel ( col_calc )) ;
);
Liste:
cols = {{ "g IgG in Fr II + III-Suspension", If (
: Name ( "ISB-Pastenquelle / Plasmatyp" ) ==
:Name ( "Füllungs-Pastenquelle / Plasmatyp füllen" ) ==
:Name ( "SFB-Pastenquelle / Plasmatyp" ) .
:Name ( Einzelne Fr 2 + 3-Paste suspendiert (kg) [Bk] ) *
: Gewicht der Lösung nach Zugabe von IM HOAc,
Leeren ()
);}, .....};
Schleife:
Zum ( i = 1, i <= N Artikel ( Cols ) , i ++,
Zum ( k = 1, k ( Cols [ ich ]) , k ++,
cn = cols [ ich ] [ k ] cl = Cols [ ich ] [ k + 1 ] ;
) ;Show ( cn, cl ) ;
add_col ( cn, cl ) ;
) ;
Protokollbericht:
cn = "g IgG in Fr II + III-Suspension";
cl = Wenn (: Name ("ISB-Einfügungsquelle / Plasmatyp") ==: Name ("Füllstapel-Einfügequelle / Plasmatyp") ==: Name ("SFB-Einfügungsquelle / Plasmatyp"),: Name (" Einzelne Fr 2 + 3-Paste suspendiert (kg) [Bk] ") *: Gewicht der Lösung nach Zugabe von IM HOAc, leer ());
col_name = "g IgG in Fr II + III-Suspension";
col_calc =.;
** Nicht genau NULL, aber ein Punkt (.).
Nachricht wurde bearbeitet von: Vivek Sharma
Du bist toll. Ich war von innen getroffen und konnte es nicht verstehen. Danke vielmals!!
Sie brauchen nameexpr () an drei Stellen.
add_col = Function( {col_name, col_calc},
Show( col_name, Name Expr( col_calc ) );
cal_2 << New Column( col_name, Numeric, Continuous, Format( "Best", 12 ),
Formula( Name Expr( col_calc ) )
);
);
cols = {{"g IgG in Fr II+III Suspension", If(
:Name( "ISB Paste Source/Plasma Type" ) ==
:Name( "Fill Batch Paste Source/Plasma Type" ) ==
:Name( "SFB Paste Source/Plasma Type" ),
:Name( "Individual Fr 2+3 Paste Suspended (Kg) [Bk]" ) *
:Solution Weight After IM HOAc Addition,Empty()) ;
}};
For( i = 1, i <= N Items( cols ), i++,
For( k = 1, k < N Items( cols ), k++,
cn = cols;
cl = cols[k + 1];
);
Show( cn, cl );
add_col( cn, Name Expr( cl ) );
);
nameexpr ist erforderlich, wenn cl oder col_calc in einem Kontext verwendet wird, in dem es normalerweise ausgewertet würde, der Ausdruck jedoch nicht ausgewertet wird.
Mehr Info Spaltenformel .