Minimum-Maximum-Summe: Unterschied zwischen den Versionen
Aus Asprova Hilfe
								
												
				GK (Diskussion | Beiträge)  | 
				GK (Diskussion | Beiträge)   (→CountIF( list, condition ))  | 
				||
| (6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 91: | Zeile 91: | ||
|<code>MaxIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime)</code>||120M  | |<code>MaxIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime)</code>||120M  | ||
|-  | |-  | ||
| − | |colspan="2"|<code>ME  | + | |colspan="2"|<code>ME</code> ist hier Auftrag "01".  | 
{|  | {|  | ||
|-  | |-  | ||
| Zeile 105: | Zeile 105: | ||
|-  | |-  | ||
|}  | |}  | ||
| − | |||
=== MaxValue( value1, value2 ) ===  | === MaxValue( value1, value2 ) ===  | ||
| Zeile 156: | Zeile 155: | ||
|}  | |}  | ||
| − | + | === MaxObject( list, prop ) ===  | |
| − | + | {| class="wikitable"  | |
| − | Parameter  | + | |-  | 
| − | + | !rowspan="2"|Parameter  | |
| − | + | |width="1px"|''list''||colspan="2"|Klassenname oder Eigenschaft mit [Datentyp] "Objekt"  | |
| − | {|  | + | |-  | 
| + | |''prop''||colspan="2"|Zieleigenschaft  | ||
| + | |-  | ||
| + | !Rückgabewert  | ||
| + | |colspan="3"|Gibt das Objekt zurück, dessen ''prop'' den maximalen Wert in ''list'' hat.  | ||
| + | |-  | ||
| + | !rowspan="4"|Beispiele  | ||
| + | |<code>MaxObject('Order',TARGET.Qty)</code>||width="1px"|03||Auftragsobjekt  | ||
| + | |-  | ||
| + | |colspan="3"|  | ||
| + | {| class="wikitable  | ||
|-  | |-  | ||
| − | |   | + | |+ Auftragstabelle  | 
|-  | |-  | ||
| − | ||   | + | !style="background: #3C78AE; color:white;"|Auftragscode  | 
| + | !style="background: #3C78AE; color:white;"|Artikel  | ||
| + | !style="background: #3C78AE; color:white;"|Menge  | ||
| + | |- style="background: white"  | ||
| + | |01||Artikel A||align="right" style="background: #A1FFD0;"|50  | ||
| + | |- style="background: #DFEBF4;"  | ||
| + | |02||Artikel A||align="right" style="background: #A1FFD0;"|35  | ||
| + | |- style="background: white"  | ||
| + | |style=" border-width: 2px; border-color: red;"|03||Artikel B||align="right" style="background: #A1FFD0;"|70  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | |-  | |
| − | + | |<code>Max(ME.Child,TARGET.Work_OperationProductionTime)</code>||01:20||Vorgangsobjekt  | |
| − | + | |-  | |
| − | + | |colspan="3"|<code>ME.Operation</code> ist hier Auftrag "01".  | |
{|  | {|  | ||
|-  | |-  | ||
| − | |   | + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:10<br>2H  | 
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 2px; border-color: red; padding: 5px;"|01:20<br>3H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:30<br>2H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:40<br>1H  | ||
| + | |-  | ||
| + | |}  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | === MaxObjectIF( list, condition, prop ) ===  | |
| − | + | {| class="wikitable"  | |
| − | + | |-  | |
| − | {|  | + | !rowspan="3"|Parameter  | 
| + | |width="1px"|''list''||colspan="2"|Klassenname oder Eigenschaft mit [Datentyp] "Objekt"  | ||
| + | |-  | ||
| + | |''condition''||colspan="2"|Filterbedingung  | ||
| + | |-  | ||
| + | |''prop''||colspan="2"|Zieleigenschaft  | ||
| + | |-  | ||
| + | !Rückgabewert  | ||
| + | |colspan="3"|Gibt das Objekt zurück, dessen ''prop'' den maximalen Wert in ''list'' hat und ''condition'' erfüllt.  | ||
| + | |-  | ||
| + | !rowspan="4"|Beispiele  | ||
| + | |<code>MaxObjectIF('Order',TARGET.Item=='Artikel A',TARGET.Qty)</code>||width="1px"|01||Auftragsobjekt  | ||
| + | |-  | ||
| + | |colspan="3"|  | ||
| + | {| class="wikitable  | ||
| + | |-  | ||
| + | |+ Auftragstabelle  | ||
|-  | |-  | ||
| − | |   | + | !style="background: #3C78AE; color:white;"|Auftragscode  | 
| + | !style="background: #3C78AE; color:white;"|Artikel  | ||
| + | !style="background: #3C78AE; color:white;"|Menge  | ||
| + | |- style="background: white"  | ||
| + | |style=" border-width: 2px; border-color: red;"|01||Artikel A||align="right" style="background: #A1FFD0;"|50  | ||
| + | |- style="background: #DFEBF4;"  | ||
| + | |02||Artikel A||align="right" style="background: #A1FFD0;"|35  | ||
| + | |- style="background: white"  | ||
| + | |03||Artikel B||align="right" style="background: #A1FFD0;"|70  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | |-  | |
| − | + | |<code>MaxObjectIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime)</code>||01:30||Vorgangsobjekt  | |
| − | + | |-  | |
| − | + | |colspan="3"|<code>ME</code> ist hier Auftrag "01".  | |
{|  | {|  | ||
|-  | |-  | ||
| − | |   | + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:10<br>2H  | 
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px;padding: 5px;"|01:20<br>3H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 2px; border-color: red;  padding: 5px;"|01:30<br>2H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:40<br>1H  | ||
| + | |-  | ||
| + | |}  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | == Minimum ==  | |
| − | [  | + | === Min( list, prop ) ===  | 
| − | + | {| class="wikitable"  | |
| − | + | |-  | |
| − | + | !rowspan="2"|Parameter  | |
| − | + | |width="1px"|''list''||Klassenname oder Eigenschaft mit [Datentyp] "Objekt"  | |
| − | + | |-  | |
| − | + | |''prop''||Zieleigenschaft  | |
| − | + | |-  | |
| − | + | !Rückgabewert  | |
| + | |colspan="2"|Gibt den minimalen Wert von ''prop'' in ''list'' zurück.  | ||
| + | |-  | ||
| + | !rowspan="4"|Beispiele  | ||
| + | |<code>Min('Order',TARGET.Qty)</code>||35  | ||
|-  | |-  | ||
| − | |   | + | |colspan="2"|  | 
| + | {| class="wikitable  | ||
|-  | |-  | ||
| − | |  | + | |+ Auftragstabelle  | 
|-  | |-  | ||
| − | ||   | + | !style="background: #3C78AE; color:white;"|Auftragscode  | 
| + | !style="background: #3C78AE; color:white;"|Artikel  | ||
| + | !style="background: #3C78AE; color:white;"|Menge  | ||
| + | |- style="background: white"  | ||
| + | |01||Artikel A||align="right" style="background: #A1FFD0;"|50  | ||
| + | |- style="background: #DFEBF4;"  | ||
| + | |02||Artikel A||align="right" style="background: #A1FFD0; border-width: 2px; border-color: red;"|35  | ||
| + | |- style="background: white"  | ||
| + | |03||Artikel B||align="right" style="background: #A1FFD0;"|70  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | |-  | |
| − | + | |<code>Min(ME.Child,TARGET.Work_OperationProductionTime)</code>||60M  | |
| − | + | |-  | |
| − | + | |colspan="2"|<code>ME.Operation</code> ist hier Auftrag "01".  | |
{|  | {|  | ||
|-  | |-  | ||
| − | |   | + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:10<br>2H  | 
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:20<br>3H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px;; padding: 5px;"|01:30<br>2H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 2px; border-color: red padding: 5px;"|01:40<br>1H  | ||
| + | |-  | ||
| + | |}  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | === MinIF( list, condition, prop ) ===  | |
| − | + | {| class="wikitable"  | |
| − | + | |-  | |
| − | {|  | + | !rowspan="3"|Parameter  | 
| + | |width="1px"|''list''||Klassenname oder Eigenschaft mit [Datentyp] "Objekt"  | ||
| + | |-  | ||
| + | |''condition''||Filterbedingung  | ||
| + | |-  | ||
| + | |''prop''||Zieleigenschaft  | ||
| + | |-  | ||
| + | !Rückgabewert  | ||
| + | |colspan="2"|Gibt den minimalen Wert von ''prop'' in ''list'' zurück, solange ''condition'' erfüllt wird.  | ||
| + | |-  | ||
| + | !rowspan="4"|Beispiele  | ||
| + | |<code>MinIF('Order',TARGET.Item=='Artikel A',TARGET.Qty)</code>||35  | ||
| + | |-  | ||
| + | |colspan="2"|  | ||
| + | {| class="wikitable  | ||
| + | |-  | ||
| + | |+ Auftragstabelle  | ||
|-  | |-  | ||
| − | |   | + | !style="background: #3C78AE; color:white;"|Auftragscode  | 
| + | !style="background: #3C78AE; color:white;"|Artikel  | ||
| + | !style="background: #3C78AE; color:white;"|Menge  | ||
| + | |- style="background: white"  | ||
| + | |01||Artikel A||align="right" style="background: #A1FFD0;"|50  | ||
| + | |- style="background: #DFEBF4;"  | ||
| + | |02||Artikel A||align="right" style="background: #A1FFD0; border-width: 2px; border-color: red;"|35  | ||
| + | |- style="background: white"  | ||
| + | |03||Artikel B||align="right" style="background: #A1FFD0;"|70  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | |-  | |
| − | + | |<code>MinIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime)</code>||60M  | |
| − | + | |-  | |
| − | + | |colspan="2"|<code>ME</code> ist hier Auftrag "01".  | |
{|  | {|  | ||
|-  | |-  | ||
| − | |   | + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:10<br>2H  | 
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:20<br>3H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:30<br>2H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 2px; border-color: red; padding: 5px;"|01:40<br>1H  | ||
| + | |-  | ||
| + | |}  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | === MinValue( value1, value2 ) ===  | |
| − | + | {| class="wikitable"  | |
| − | + | |-  | |
| − | + | !rowspan="2"|Parameter  | |
| − | + | |width="1px"|''value1''||Erster Vergleichswert  | |
| − | + | |-  | |
| − | + | |''value2''||Zweiter Vergleichswert  | |
| − | + | |-  | |
| − | + | !Rückgabewert  | |
| − | + | |colspan="2"|Gibt den kleineren Wert von ''value1'' und ''value2'' zurück.  | |
| + | |-  | ||
| + | !rowspan="15"|Beispiele  | ||
| + | |<code>MinValue(1.2,3.4)</code>||1.2  | ||
| + | |-  | ||
| + | |colspan="2"|Bei Zahlen wird direkt verglichen welche kleiner ist.  | ||
| + | |-  | ||
| + | |<code>MinValue('ab','cd')</code>||"ab"  | ||
| + | |-  | ||
| + | |<code>MinValue('Ab','cd')</code>||"cd"  | ||
| + | |-  | ||
| + | |colspan="2"|Strings werden lexikographisch (Kleinbuchstaben vor Großbuchstaben) ausgewertet.  | ||
| + | |-  | ||
| + | |<code>MinValue(#2020/01/01#,#2021/01/01#)</code>||01/01/2020  | ||
| + | |-  | ||
| + | |colspan="2"|Frühere Daten haben den kleineren Wert.  | ||
| + | |-  | ||
| + | |<code>MinValue(TRUE,FALSE)</code>||FALSE  | ||
| + | |-  | ||
| + | |colspan="2"|TRUE wird als größer als FALSE angesehen.  | ||
| + | |-  | ||
| + | |<code>MinValue(RGB(12,34,56),RGB(98,76,54))</code>||RGB(12,34,56)  | ||
| + | |-  | ||
| + | |colspan="2"|Bei Farben werden die numerischen Werte in der Reihenfolge "R", "G" und "B" verglichen.  | ||
| + | |-  | ||
| + | |<code>MinValue(''<Eigenschaft ohne Wert>'',123)</code>||123  | ||
| + | |-  | ||
| + | |<code>MinValue(123,''<Eigenschaft ohne Wert>'')</code>||123  | ||
| + | |-  | ||
| + | |<span style="white-space: nowrap;"><code>MinValue(''<Eigenschaft ohne Wert>'',''<Eigenschaft ohne Wert>'')</code></span>||''kein Wert''  | ||
|-  | |-  | ||
| − | |   | + | |colspan="2"|Enthält einer der Parameter keinen Wert, so wird der andere Wert zurückgegeben.  | 
|-  | |-  | ||
| − | ||   | + | !Hinweise  | 
| + | |colspan="2"|  | ||
| + | * ''value1'' und ''value2'' können vertauscht werden, ohne dass sich der Rückgabewert ändert.  | ||
| + | * Haben ''value1'' und ''value2'' unterschiedliche Datentypen, so ist der Rückgabewert nicht definiert.  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | Rückgabewert  | + | === MinObject( list, prop ) ===  | 
| − | + | {| class="wikitable"  | |
| − | + | |-  | |
| − | {|  | + | !rowspan="2"|Parameter  | 
| + | |width="1px"|''list''||colspan="2"|Klassenname oder Eigenschaft mit [Datentyp] "Objekt"  | ||
| + | |-  | ||
| + | |''prop''||colspan="2"|Zieleigenschaft  | ||
| + | |-  | ||
| + | !Rückgabewert  | ||
| + | |colspan="3"|Gibt das Objekt zurück, dessen ''prop'' den minimalen Wert in ''list'' hat.  | ||
| + | |-  | ||
| + | !rowspan="4"|Beispiele  | ||
| + | |<code>MinObject('Order',TARGET.Qty)</code>||width="1px"|02||Auftragsobjekt  | ||
| + | |-  | ||
| + | |colspan="3"|  | ||
| + | {| class="wikitable  | ||
| + | |-  | ||
| + | |+ Auftragstabelle  | ||
|-  | |-  | ||
| − | |   | + | !style="background: #3C78AE; color:white;"|Auftragscode  | 
| + | !style="background: #3C78AE; color:white;"|Artikel  | ||
| + | !style="background: #3C78AE; color:white;"|Menge  | ||
| + | |- style="background: white"  | ||
| + | |01||Artikel A||align="right" style="background: #A1FFD0;"|50  | ||
| + | |- style="background: #DFEBF4;"  | ||
| + | |style=" border-width: 2px; border-color: red;"|02||Artikel A||align="right" style="background: #A1FFD0;"|35  | ||
| + | |- style="background: white"  | ||
| + | |03||Artikel B||align="right" style="background: #A1FFD0;"|70  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | |-  | |
| − | + | |<code>Min(ME.Child,TARGET.Work_OperationProductionTime)</code>||01:40||Vorgangsobjekt  | |
| − | + | |-  | |
| − | + | |colspan="3"|<code>ME.Operation</code> ist hier Auftrag "01".  | |
{|  | {|  | ||
|-  | |-  | ||
| − | |   | + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:10<br>2H  | 
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:20<br>3H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:30<br>2H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 2px; border-color: red; padding: 5px;"|01:40<br>1H  | ||
| + | |-  | ||
| + | |}  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | === MinObjectIF( list, condition, prop ) ===  | |
| − | [  | + | {| class="wikitable"  | 
| − | + | |-  | |
| − | + | !rowspan="3"|Parameter  | |
| + | |width="1px"|''list''||colspan="2"|Klassenname oder Eigenschaft mit [Datentyp] "Objekt"  | ||
| + | |-  | ||
| + | |''condition''||colspan="2"|Filterbedingung  | ||
| + | |-  | ||
| + | |''prop''||colspan="2"|Zieleigenschaft  | ||
|-  | |-  | ||
| − | |   | + | !Rückgabewert  | 
| + | |colspan="3"|Gibt das Objekt zurück, dessen ''prop'' den minimalen Wert in ''list'' hat und ''condition'' erfüllt.  | ||
|-  | |-  | ||
| − | |  | + | !rowspan="4"|Beispiele  | 
| − | + | |<code>MinObjectIF('Order',TARGET.Item=='Artikel A',TARGET.Qty)</code>||width="1px"|02||Auftragsobjekt  | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|-  | |-  | ||
| − | |   | + | |colspan="3"|  | 
| + | {| class="wikitable  | ||
|-  | |-  | ||
| − | |  | + | |+ Auftragstabelle  | 
|-  | |-  | ||
| − | ||   | + | !style="background: #3C78AE; color:white;"|Auftragscode  | 
| + | !style="background: #3C78AE; color:white;"|Artikel  | ||
| + | !style="background: #3C78AE; color:white;"|Menge  | ||
| + | |- style="background: white"  | ||
| + | |01||Artikel A||align="right" style="background: #A1FFD0;"|50  | ||
| + | |- style="background: #DFEBF4;"  | ||
| + | |style=" border-width: 2px; border-color: red;"|02||Artikel A||align="right" style="background: #A1FFD0;"|35  | ||
| + | |- style="background: white"  | ||
| + | |03||Artikel B||align="right" style="background: #A1FFD0;"|70  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | |-  | |
| − | + | |<code>MinObjectIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime)</code>||01:40||Vorgangsobjekt  | |
| − | + | |-  | |
| − | + | |colspan="3"|<code>ME</code> ist hier Auftrag "01".  | |
{|  | {|  | ||
|-  | |-  | ||
| − | |   | + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:10<br>2H  | 
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px;padding: 5px;"|01:20<br>3H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:30<br>2H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 2px; border-color: red; padding: 5px;"|01:40<br>1H  | ||
| + | |-  | ||
| + | |}  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | == Summe etc. ==  | |
| − | + | === Sum( list, prop ) ===  | |
| − | + | {| class="wikitable"  | |
| − | {|  | + | |-  | 
| + | !rowspan="2"|Parameter  | ||
| + | |width="1px"|''list''||Klassenname oder Eigenschaft mit [Datentyp] "Objekt"  | ||
| + | |-  | ||
| + | |''prop''||Zieleigenschaft  | ||
| + | |-  | ||
| + | !Rückgabewert  | ||
| + | |colspan="2"|Gibt die Summe der Werte von ''prop'' in ''list'' zurück.  | ||
| + | |-  | ||
| + | !rowspan="4"|Beispiele  | ||
| + | |<code>Sum('Order',TARGET.Qty)</code>||155  | ||
| + | |-  | ||
| + | |colspan="2"|  | ||
| + | {| class="wikitable  | ||
| + | |-  | ||
| + | |+ Auftragstabelle  | ||
|-  | |-  | ||
| − | |   | + | !style="background: #3C78AE; color:white;"|Auftragscode  | 
| + | !style="background: #3C78AE; color:white;"|Artikel  | ||
| + | !style="background: #3C78AE; color:white;"|Menge  | ||
| + | |- style="background: white"  | ||
| + | |01||Artikel A||align="right" style="background: #A1FFD0; border-top: solid 2px red; border-left: solid 2px red; border-right: solid 2px red;"|50  | ||
| + | |- style="background: #DFEBF4;"  | ||
| + | |02||Artikel A||align="right" style="background: #A1FFD0; border-left: solid 2px red; border-right: solid 2px red;"|35  | ||
| + | |- style="background: white"  | ||
| + | |03||Artikel B||align="right" style="background: #A1FFD0; border-left: solid 2px red; border-right: solid 2px red; border-bottom: solid 2px red;"|70  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | |-  | |
| − | + | |<code>Sum(ME.Child,TARGET.Work_OperationProductionTime)</code>||600M  | |
| − | + | |-  | |
| − | + | |colspan="2"|<code>ME.Operation</code> ist hier Auftrag "01".  | |
{|  | {|  | ||
|-  | |-  | ||
| − | |   | + | |style="background-color:#A1FFD0; border-style: solid; border-width: 2px; border-color: red; padding: 5px;"|01:10<br>2H  | 
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 2px; border-color: red; padding: 5px;"|01:20<br>3H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 2px; border-color: red; padding: 5px;"|01:30<br>2H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 2px; border-color: red; padding: 5px;"|01:40<br>1H  | ||
| + | |-  | ||
| + | |}  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | === SumIF( list, condition, prop ) ===  | |
| − | [  | + | {| class="wikitable"  | 
| − | + | |-  | |
| − | + | !rowspan="3"|Parameter  | |
| − | + | |width="1px"|''list''||Klassenname oder Eigenschaft mit [Datentyp] "Objekt"  | |
| − | + | |-  | |
| − | + | |''condition''||Filterbedingung  | |
| − | + | |-  | |
| − | + | |''prop''||Zieleigenschaft  | |
| − | {|  | + | |-  | 
| + | !Rückgabewert  | ||
| + | |colspan="2"|Gibt die Summe der Werte von ''prop'' in ''list'' zurück, solange ''condition'' erfüllt wird.  | ||
| + | |-  | ||
| + | !rowspan="4"|Beispiele  | ||
| + | |<code>SumIF('Order',TARGET.Item=='Artikel A',TARGET.Qty)</code>||85  | ||
| + | |-  | ||
| + | |colspan="2"|  | ||
| + | {| class="wikitable  | ||
|-  | |-  | ||
| − | |   | + | |+ Auftragstabelle  | 
|-  | |-  | ||
| − | ||   | + | !style="background: #3C78AE; color:white;"|Auftragscode  | 
| + | !style="background: #3C78AE; color:white;"|Artikel  | ||
| + | !style="background: #3C78AE; color:white;"|Menge  | ||
| + | |- style="background: white"  | ||
| + | |01||Artikel A||align="right" style="background: #A1FFD0; border-top: solid 2px red; border-left: solid 2px red; border-right: solid 2px red;"|50  | ||
| + | |- style="background: #DFEBF4;"  | ||
| + | |02||Artikel A||align="right" style="background: #A1FFD0; border-left: solid 2px red; border-right: solid 2px red; border-bottom: solid 2px red;"|35  | ||
| + | |- style="background: white"  | ||
| + | |03||Artikel B||align="right" style="background: #A1FFD0;"|70  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | |-  | |
| − | + | |<code>SumIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime)</code>||180M  | |
| − | + | |-  | |
| − | + | |colspan="2"|<code>ME</code> ist hier Auftrag "01".  | |
{|  | {|  | ||
|-  | |-  | ||
| − | |   | + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px; padding: 5px;"|01:10<br>2H  | 
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 1px;padding: 5px;"|01:20<br>3H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 2px; border-color: red; padding: 5px;"|01:30<br>2H  | ||
| + | |→  | ||
| + | |style="background-color:#A1FFD0; border-style: solid; border-width: 2px; border-color: red; padding: 5px;"|01:40<br>1H  | ||
| + | |-  | ||
| + | |}  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | === Product( list, prop ) ===  | |
| − | + | {| class="wikitable"  | |
| − | + | |-  | |
| − | + | !rowspan="2"|Parameter  | |
| + | |width="1px"|''list''||Klassenname oder Eigenschaft mit [Datentyp] "Objekt"  | ||
| + | |-  | ||
| + | |''prop''||Zieleigenschaft  | ||
|-  | |-  | ||
| − | |   | + | !Rückgabewert  | 
| + | |colspan="2"|Gibt das Produkt der Werte von ''prop'' in ''list'' zurück.  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | ProductIF(   | + | === ProductIF( list, condition, prop ) ===  | 
| − | + | {| class="wikitable"  | |
| − | |||
| − | |||
| − | |||
| − | {|  | ||
|-  | |-  | ||
| − | |   | + | !rowspan="3"|Parameter  | 
| + | |width="1px"|''list''||Klassenname oder Eigenschaft mit [Datentyp] "Objekt"  | ||
|-  | |-  | ||
| − | ||   | + | |''condition''||Filterbedingung  | 
|-  | |-  | ||
| − | ||   | + | |''prop''||Zieleigenschaft  | 
| + | |-  | ||
| + | !Rückgabewert  | ||
| + | |colspan="2"|Gibt das Produkt der Werte von ''prop'' in ''list'' zurück, solange ''condition'' erfüllt wird.  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | === Equal( prop ) ===  | |
| − | + | {| class="wikitable"  | |
| − | |||
| − | {|  | ||
|-  | |-  | ||
| − | |   | + | !Parameter  | 
| + | |width="1px"|''prop''||Zieleigenschaft  | ||
|-  | |-  | ||
| − | |  | + | !Rückgabewert  | 
| − | + | |colspan="2"|Gibt die Summe der Werte von ''prop'' in ''list'' zurück.  | |
| − | |||
| − | |||
| − | |||
| − | |||
|-  | |-  | ||
| − | |   | + | !rowspan="2"|Beispiele  | 
| + | |colspan="2"|<code>Equal(ME.Order.Customer)</code>  | ||
|-  | |-  | ||
| − | |  | + | |colspan="2"|[[Image:Incodefunc-equal01.png]]<br>Aufträge werden verknüpft, wenn deren [Kunde] gleich ist.  | 
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|-  | |-  | ||
| − | |   | + | !Hinweise  | 
| + | |colspan="2"|  | ||
| + | * Diese Funktion wird nur in der [Verknüpfungsbedingung] von Artikeln genutzt.  | ||
| + | * <code>Equal(ME.Order.Customer)</code> entspricht <code>ME.Order.Customer==OTHER.Order.Customer</code>.  | ||
|-  | |-  | ||
|}  | |}  | ||
| − | + | === CountIF( list, condition ) ===  | |
| − | + | {| class="wikitable"  | |
| − | + | |-  | |
| − | + | !rowspan="2"|Parameter  | |
| + | |width="1px"|''list''||Klassenname oder Eigenschaft mit [Datentyp] "Objekt"  | ||
|-  | |-  | ||
| − | |   | + | |''condition''||Filterbedingung  | 
|-  | |-  | ||
| − | |  | + | !Rückgabewert  | 
| − | + | |colspan="2"|Gibt die Anzahl der Objekte in ''list'' zurück, für die ''condition'' erfüllt wird.  | |
| − | |||
| − | |||
| − | |||
| − | |||
|-  | |-  | ||
| − | |   | + | !rowspan="2"|Beispiele  | 
| + | |<code>CountIf(ME.Operations,TARGET.Status!="B")</code>||Wenn <code>ME</code> ein Auftrag ist, wird zurückgegeben, wie viele seiner Vorgänge nicht beendet sind.  | ||
|-  | |-  | ||
| − | |  | + | |<code>CountIf(ME.Order.RightmostOrder,TARGET.Lateness>0s)</code>||Wenn <code>ME</code> ein Vorgang ist, wird zurückgegeben, wie viele der verknüpften Aufträge für Endprodukte verspätet sind.  | 
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|-  | |-  | ||
| − | |   | + | !Hinweise  | 
| + | |colspan="2"|  | ||
| + | * <code>CountIf(list,condition)</code> gibt das gleiche Ergebnis zurück wie [[#SumIF.28_list.2C_condition.2C_prop_.29|<code>SumIf(list,condition,1)</code>]], ist aber etwas schneller.  | ||
| + | * Es gibt diese Funktion nicht ohne ''condition'', nutzen Sie dafür stattdessen [[Eigenschaft#PropCount.28_prop_.29|<code>PropCount()</code>]].  | ||
|-  | |-  | ||
|}  | |}  | ||
Aktuelle Version vom 7. Mai 2025, 07:14 Uhr
Hilfe Nummer: 741570
Asprova stellt Ihnen die folgenden Funktionen zum Ermitteln von Maximum, Minimum, Summe etc. zur Verfügung.
Inhaltsverzeichnis
Maximum
Max( list, prop )
| Parameter | list | Klassenname oder Eigenschaft mit [Datentyp] "Objekt" | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| prop | Zieleigenschaft | ||||||||||||
| Rückgabewert | Gibt den maximalen Wert von prop in list zurück. | ||||||||||||
| Beispiele | Max('Order',TARGET.Qty) | 
70 | |||||||||||
  | |||||||||||||
Max(ME.Child,TARGET.Work_OperationProductionTime) | 
180M | ||||||||||||
ME.Operation ist hier Auftrag "01".
  | |||||||||||||
MaxIF( list, condition, prop )
| Parameter | list | Klassenname oder Eigenschaft mit [Datentyp] "Objekt" | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| condition | Filterbedingung | ||||||||||||
| prop | Zieleigenschaft | ||||||||||||
| Rückgabewert | Gibt den maximalen Wert von prop in list zurück, solange condition erfüllt wird. | ||||||||||||
| Beispiele | MaxIF('Order',TARGET.Item=='Artikel A',TARGET.Qty) | 
50 | |||||||||||
  | |||||||||||||
MaxIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime) | 
120M | ||||||||||||
ME ist hier Auftrag "01".
  | |||||||||||||
MaxValue( value1, value2 )
| Parameter | value1 | Erster Vergleichswert | 
|---|---|---|
| value2 | Zweiter Vergleichswert | |
| Rückgabewert | Gibt den größeren Wert von value1 und value2 zurück. | |
| Beispiele | MaxValue(1.2,3.4) | 
3.4 | 
| Bei Zahlen wird direkt verglichen welche größer ist. | ||
MaxValue('ab','cd') | 
"cd" | |
MaxValue('Ab','cd') | 
"Ab" | |
| Strings werden lexikographisch (Großbuchstaben vor Kleinbuchstaben) ausgewertet. | ||
MaxValue(#2020/01/01#,#2021/01/01#) | 
01/01/2021 | |
| Spätere Daten haben den größeren Wert. | ||
MaxValue(TRUE,FALSE) | 
TRUE | |
| TRUE wird als größer als FALSE angesehen. | ||
MaxValue(RGB(12,34,56),RGB(98,76,54)) | 
RGB(98,76,54) | |
| Bei Farben werden die numerischen Werte in der Reihenfolge "R", "G" und "B" verglichen. | ||
MaxValue(<Eigenschaft ohne Wert>,123) | 
123 | |
MaxValue(123,<Eigenschaft ohne Wert>) | 
123 | |
MaxValue(<Eigenschaft ohne Wert>,<Eigenschaft ohne Wert>) | 
kein Wert | |
| Enthält einer der Parameter keinen Wert, so wird der andere Wert zurückgegeben. | ||
| Hinweise | 
  | |
MaxObject( list, prop )
| Parameter | list | Klassenname oder Eigenschaft mit [Datentyp] "Objekt" | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| prop | Zieleigenschaft | |||||||||||||
| Rückgabewert | Gibt das Objekt zurück, dessen prop den maximalen Wert in list hat. | |||||||||||||
| Beispiele | MaxObject('Order',TARGET.Qty) | 
03 | Auftragsobjekt | |||||||||||
  | ||||||||||||||
Max(ME.Child,TARGET.Work_OperationProductionTime) | 
01:20 | Vorgangsobjekt | ||||||||||||
ME.Operation ist hier Auftrag "01".
  | ||||||||||||||
MaxObjectIF( list, condition, prop )
| Parameter | list | Klassenname oder Eigenschaft mit [Datentyp] "Objekt" | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| condition | Filterbedingung | |||||||||||||
| prop | Zieleigenschaft | |||||||||||||
| Rückgabewert | Gibt das Objekt zurück, dessen prop den maximalen Wert in list hat und condition erfüllt. | |||||||||||||
| Beispiele | MaxObjectIF('Order',TARGET.Item=='Artikel A',TARGET.Qty) | 
01 | Auftragsobjekt | |||||||||||
  | ||||||||||||||
MaxObjectIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime) | 
01:30 | Vorgangsobjekt | ||||||||||||
ME ist hier Auftrag "01".
  | ||||||||||||||
Minimum
Min( list, prop )
| Parameter | list | Klassenname oder Eigenschaft mit [Datentyp] "Objekt" | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| prop | Zieleigenschaft | ||||||||||||
| Rückgabewert | Gibt den minimalen Wert von prop in list zurück. | ||||||||||||
| Beispiele | Min('Order',TARGET.Qty) | 
35 | |||||||||||
  | |||||||||||||
Min(ME.Child,TARGET.Work_OperationProductionTime) | 
60M | ||||||||||||
ME.Operation ist hier Auftrag "01".
  | |||||||||||||
MinIF( list, condition, prop )
| Parameter | list | Klassenname oder Eigenschaft mit [Datentyp] "Objekt" | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| condition | Filterbedingung | ||||||||||||
| prop | Zieleigenschaft | ||||||||||||
| Rückgabewert | Gibt den minimalen Wert von prop in list zurück, solange condition erfüllt wird. | ||||||||||||
| Beispiele | MinIF('Order',TARGET.Item=='Artikel A',TARGET.Qty) | 
35 | |||||||||||
  | |||||||||||||
MinIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime) | 
60M | ||||||||||||
ME ist hier Auftrag "01".
  | |||||||||||||
MinValue( value1, value2 )
| Parameter | value1 | Erster Vergleichswert | 
|---|---|---|
| value2 | Zweiter Vergleichswert | |
| Rückgabewert | Gibt den kleineren Wert von value1 und value2 zurück. | |
| Beispiele | MinValue(1.2,3.4) | 
1.2 | 
| Bei Zahlen wird direkt verglichen welche kleiner ist. | ||
MinValue('ab','cd') | 
"ab" | |
MinValue('Ab','cd') | 
"cd" | |
| Strings werden lexikographisch (Kleinbuchstaben vor Großbuchstaben) ausgewertet. | ||
MinValue(#2020/01/01#,#2021/01/01#) | 
01/01/2020 | |
| Frühere Daten haben den kleineren Wert. | ||
MinValue(TRUE,FALSE) | 
FALSE | |
| TRUE wird als größer als FALSE angesehen. | ||
MinValue(RGB(12,34,56),RGB(98,76,54)) | 
RGB(12,34,56) | |
| Bei Farben werden die numerischen Werte in der Reihenfolge "R", "G" und "B" verglichen. | ||
MinValue(<Eigenschaft ohne Wert>,123) | 
123 | |
MinValue(123,<Eigenschaft ohne Wert>) | 
123 | |
MinValue(<Eigenschaft ohne Wert>,<Eigenschaft ohne Wert>) | 
kein Wert | |
| Enthält einer der Parameter keinen Wert, so wird der andere Wert zurückgegeben. | ||
| Hinweise | 
  | |
MinObject( list, prop )
| Parameter | list | Klassenname oder Eigenschaft mit [Datentyp] "Objekt" | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| prop | Zieleigenschaft | |||||||||||||
| Rückgabewert | Gibt das Objekt zurück, dessen prop den minimalen Wert in list hat. | |||||||||||||
| Beispiele | MinObject('Order',TARGET.Qty) | 
02 | Auftragsobjekt | |||||||||||
  | ||||||||||||||
Min(ME.Child,TARGET.Work_OperationProductionTime) | 
01:40 | Vorgangsobjekt | ||||||||||||
ME.Operation ist hier Auftrag "01".
  | ||||||||||||||
MinObjectIF( list, condition, prop )
| Parameter | list | Klassenname oder Eigenschaft mit [Datentyp] "Objekt" | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| condition | Filterbedingung | |||||||||||||
| prop | Zieleigenschaft | |||||||||||||
| Rückgabewert | Gibt das Objekt zurück, dessen prop den minimalen Wert in list hat und condition erfüllt. | |||||||||||||
| Beispiele | MinObjectIF('Order',TARGET.Item=='Artikel A',TARGET.Qty) | 
02 | Auftragsobjekt | |||||||||||
  | ||||||||||||||
MinObjectIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime) | 
01:40 | Vorgangsobjekt | ||||||||||||
ME ist hier Auftrag "01".
  | ||||||||||||||
Summe etc.
Sum( list, prop )
| Parameter | list | Klassenname oder Eigenschaft mit [Datentyp] "Objekt" | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| prop | Zieleigenschaft | ||||||||||||
| Rückgabewert | Gibt die Summe der Werte von prop in list zurück. | ||||||||||||
| Beispiele | Sum('Order',TARGET.Qty) | 
155 | |||||||||||
  | |||||||||||||
Sum(ME.Child,TARGET.Work_OperationProductionTime) | 
600M | ||||||||||||
ME.Operation ist hier Auftrag "01".
  | |||||||||||||
SumIF( list, condition, prop )
| Parameter | list | Klassenname oder Eigenschaft mit [Datentyp] "Objekt" | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| condition | Filterbedingung | ||||||||||||
| prop | Zieleigenschaft | ||||||||||||
| Rückgabewert | Gibt die Summe der Werte von prop in list zurück, solange condition erfüllt wird. | ||||||||||||
| Beispiele | SumIF('Order',TARGET.Item=='Artikel A',TARGET.Qty) | 
85 | |||||||||||
  | |||||||||||||
SumIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime) | 
180M | ||||||||||||
ME ist hier Auftrag "01".
  | |||||||||||||
Product( list, prop )
| Parameter | list | Klassenname oder Eigenschaft mit [Datentyp] "Objekt" | 
|---|---|---|
| prop | Zieleigenschaft | |
| Rückgabewert | Gibt das Produkt der Werte von prop in list zurück. | |
ProductIF( list, condition, prop )
| Parameter | list | Klassenname oder Eigenschaft mit [Datentyp] "Objekt" | 
|---|---|---|
| condition | Filterbedingung | |
| prop | Zieleigenschaft | |
| Rückgabewert | Gibt das Produkt der Werte von prop in list zurück, solange condition erfüllt wird. | |
Equal( prop )
CountIF( list, condition )
| Parameter | list | Klassenname oder Eigenschaft mit [Datentyp] "Objekt" | 
|---|---|---|
| condition | Filterbedingung | |
| Rückgabewert | Gibt die Anzahl der Objekte in list zurück, für die condition erfüllt wird. | |
| Beispiele | CountIf(ME.Operations,TARGET.Status!="B") | 
Wenn ME ein Auftrag ist, wird zurückgegeben, wie viele seiner Vorgänge nicht beendet sind.
 | 
CountIf(ME.Order.RightmostOrder,TARGET.Lateness>0s) | 
Wenn ME ein Vorgang ist, wird zurückgegeben, wie viele der verknüpften Aufträge für Endprodukte verspätet sind.
 | |
| Hinweise | 
  | |
Hilfe Nummer: 741570
