Conditional Expressions

Conditional Expressions

Conditional Expressions are not permitted. Conditional behavior can be forced, when necessary, in two different ways.

IIF Function

{IIF(Condtion, ValueA, ValueB}

In the above calculation, the “Condition” is tested to determine if it evaluates to true or false. If it evaluates to true, the expression will return ValueA. If it evaluates to false, the expression will return ValueB .

Number of Cabinets: {Cabinet.Count > 0 ? Cabinet.Count : “None”}

If the value of Cabinet.Count is 3, the result in the report will be:

Number of Cabinets: 3

If the value of Cabinet.Count is 0, then the result in the report will be:

Number of Cabinets: None

C# Ternary Operator

In C#, you can use the ternary operator. For example:

{Condition ? ValueA : ValueB}

If “Condition” is true, the expression will return ValueA. If false, it will return ValueB.

    • Related Articles

    • Text Expressions

      Text expressions are the simplest expressions. Here are some examples: SampleText 54321 Example All of the expressions above are strings, and there are no calculations. These expressions would be printed as they have been defined. These types of ...
    • Using Expressions in the Rich Text Editor of Report Designer

      The articles in this section of the Knowledge Base involve working with Rich Text for display in your reports. To learn more about the Rich Text editor, and how to access this section within the Report Designer, see An Introduction to the Rich Text ...
    • Conditional Formatting

      A user can change the appearance of components by setting specific conditions. Conditional Formatting is set up using the Conditions window, found in the Home tab of the ribbon. Fig. 1 – Home > Conditions Fig. 2 – Conditions Window Add Condition – ...
    • Using Functions in Expressions

      Built-in Functions There is a variety of built-in functions available in the Report Designer. These functions can be accessed directly from the data dictionary, or from within the Expression Editor. Here is an example of a built-in function: ...
    • Multi Line Expressions

      Multiple lines of text can be produced in a report by a single expression. To create a multi-line expression, insert a line feed before any new line. To do this, press the Enter key at the appropriate place in the code editor. There is no limit to ...
    • Recent Articles

    • Microvellum Foundation Library Release Notes | Build 26.0220

      The following release notes apply to the Microvellum Foundation Library build 26.0220. Additions Added DTC Magic Pro and Magic Star Ultra drawer systems. Magic Pro Items added in hardware file 300 and 600 lengths for all drawer heights. Add 60kg ...
    • Microvellum Release Notes | Build 25.2.0223.641

      The following release notes apply to Microvellum build 25.2.0223.641. Add 2D Elevation Tokens to 3D Drawings Fig. 1: The new 2D Elevation setting. A popularly requested feature by the community has been added to the Microvellum software: the checkbox ...
    • Microvellum Processing Center Application

      The standalone Processing Center application provides shop-floor tools for managing and executing manufacturing data generated from Microvellum projects. It enables users to: Print part labels View and print reports Create and re-create manufacturing ...
    • Microvellum Release Notes | Build 25.2.0213.641

      The following release notes apply to Microvellum build 25.2.0213.641 File Name Fix An issue was occurring when processing work orders with the Create Sequential File Names setting enabled. When the setting was enabled, a work order being processed ...
    • Microvellum Release Notes | Build 25.2.0206.641

      The following release notes apply to Microvellum build 25.2.0206.641. Item Number Fix An issue was reported regarding item numbers in composite drawings. Users who processed work orders with multiple products reported that the item numbers would ...