Create a Microsoft Adaptive Card
Use the Microsoft® Adaptive Cards designer to define an adaptive card template. click for the Microsoft help about adaptive cards.Click for information about creating a template.
Some restrictions apply to adaptive card usage in Alfabet. The following elements of adaptive cards are not supported:
- Input elements
- Actions
- Fact sets
- Image sets
- Accordions
- Navigation elements
Navigation from cards is possible but managed in Alfabet by Alfabet-specific mechanisms not using Microsoft Adaptive Cards elements.
When defining the Microsoft Adaptive Card, you can use the following Microsoft Adaptive Card features to mark content to be processed by Alfabet:
-
Binding expressions: A binding expression has the syntax ${variablename} . At runtime, the variable will be substituted with a value that you can specify in the widget definition in Alfabet. Currently, only a sub-set of the available settings can be declared as binding expressions. You can use binding expressions for text, text color, text size, and text weight. The specification of text size, color, and weight processed by Alfabet are different than the ones listed in the documentation of the adaptive cards.
If you define attributes directly in the Microsoft adaptive card, you need to set them to a value allowed by the Microsoft adaptive card specification. If you define them via binding expressions, you need to specify them as specified in the following.
You can specify both dynamic and static values for variables in Alfabet widgets.
You can use static value definitions and reuse the Microsoft adaptive card for multiple Alfabet widget card templates. Two widget card templates based on the same Microsoft adaptive card template can then be different in styling such as coloring, text size, and font weight, and they can be different in content by showing different texts or images.
Use dynamic value definitions in Alfabet widget card templates to show the current value of an object class property or to show a current indicator value. You can also define coloring based on a style in a style group. Coloring of the card can than be adapted to the colors defined for the custom theme the user selected for the Alfabet user interface.
- $data: This is the standard expression for processing arrays. Binding expressions can be used to defined the array name for $data and for each value in the array.
- Conditions: Use $if to change the output of a variable or a text based on a condition and $when to make the appearance of a part of the card dependent on a condition.
Use the JSON of the standard cards available in the meta-model delivered with the solution as a starting point for your adaptive card definitions. View the examples provided with this documentation to gain a better understanding.