Framework:Expression Uses in CoPlanner
(Just in Use)
Expressions are used throughout CoPlanner to specify or calculate values in CoPlanner Cubes or masks. This topic provides examples of the many places you can use expressions to vary the content or appearance of a CoPlanner Cube or a mask. This list is not comprehensive. You can set an expression for any property in a Formula Editor that displays the button
or in a drop-down list that displays <Expression...>.
Syntax von Ausdrücken
Expressions can contain measures, dimension attributes, application properties, session variables, macros, imports, operators, and function calls. To see or change the expression text, you must open the Formula Editior or type directly in the Properties pane. The following table lists typical ways you can use an expression to display or organize data. You can type an expression directly into a dialog box or in the Properties pane.
| Functionality | Property, Context, and Object | Example |
| Concatenate text and period function, which reduces the actual date by 12 months and the result is formatted by the given date format. | Caption or Tooltip-Property of a measure in an input mask or row view. | 'Quantity act. ' + 'TimeDimAdd(M,-12,[Period.ID],IIF('TimeDimFlag([Period.ID])'='Y','yyyy','MMM yy'))' |
| Concatenate caption of a dimension element and period function and the result is formatted by the given date format. | Caption or Tooltip-Property of a measure in an input mask or row view. | '[Sub_GuVGKV.Name]' + ' - TimeDimAdd(M,0,[Period.ID],IIF('TimeDimFlag([Period.ID])'='Y','yyyy','MMMM yyyy'))' |
| Lock a cell of a measure if an other measure (Price) is cero and the dimension element is a leaf element. | LockCondition-Property of a measure in an input mask or row view. | ([Price]=0 and [Products.ChildCount]=0) or ([Products.ChildCount]>0) |
| Restrict a filter. Only the products will be shown, assigned the selected product group. | SpecialDefinition of a dimension used as filter in an input mask or row view. | AttributFilter(Product groups,me_under,[Product groups.ID]) |
| Plausibility check: It should be only allowed to enter a quantity, if a price exists and it is a leaf element. Furthermore only positive quantities are allowed.. | DataValidation-Property of a measure in an input mask or row view. Dialog box Plausibility Check in the field Settings. | [Price]<>0 and <value>>=0 |
| Formatieren einer Schriftfarbe in Abhängigkeit seiner Größe. | ConditionalStyles-Eigenschaft einer Eingabemaske oder Zeilensicht. Dialogfeld Formatierungsassistent, Bedingungen festlegen im Feld Bedingung. | [Umsatz]>=1000000 |
| Berechnung des gewichtenten Preises. | Expression und CalcBackExpression-Eigenschaft eines Measures in einem CoPlanner Würfel im Register Measure. | CalcBackExpression: [Preis_org]=WAP([Preis]) Expression: FKT_CIF([Menge]=0,[Preis_org],([Umsatz]-[Umsatz absolut])/[Menge]) |
| Berechnung einer Ist/Plan-Abweichung in Prozent. Ist kein Ist-Wert vorhanden, werden 999,00 %/-999,00 % ausgewiesen. | Expression-Eigenschaft eines Measures in einem CoPlanner Würfel im Register Measure. | FKT_CIF([Planwert]=0,IIF([Istwert]=0,0,IIF([Istwert]<0,-999/100,999/100)),([Istwert]-[Planwert])/[Planwert]) * 100 |
| Hinweis Eine Ausnahme stellt die LockCondition dar. Diese wird zwar serverseitig ausgefüht, jedoch werden die Attribute auf Basis der clientseitigen Syntax erwartet. |
Beispiel: [Menge] = 0 and [Zeit.ChildCount] = 0
| Hinweis Wird als Rückgabewert einer Funktion eine Zeichenkette erwartet, ist die gesamte Funktion mit einfachen Hochkomma ' zu qualifizieren. |
Beispiel: 'Menge Ist ' + 'TimeDimAdd(M,-12,[Zeit.ID],IIF('TimeDimFlag([Zeit.ID])'='Y','yyyy','MMM yy'))';
Siehe auch
Grundlegendes zu Ausdrücken
Angeben eines Ausdrucks
Formeleditor