This repository was archived by the owner on Jan 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed
packages/dialog/templates Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ Which value do you want for @{name(property)}?
3737- ELSEIF: @{greater(number, dialogClass.schema.properties[property].maximum)}
3838- @{number} is greater than the maximum value @{dialogClass.schema.properties[property].maximum}.
3939
40+ # unitsAlert(property)
41+ - IF: @{dialogClass.schema.properties[property].$units}
42+ - Required response for @{property} should be in @{dialogClass.schema.properties[property].$units}.
43+ - ELSE:
44+ - Unit for @{property} is not defined in the schema.
45+
4046# askString(property)
4147- ```
4248@{askHelp()}
Original file line number Diff line number Diff line change 1+ # filename
2+ - @{schemaName}-@{property}Setdimension.dialog
3+
4+ # template
5+ - ```
6+ {
7+ "$schema": "@{appSchema}",
8+ "$kind": "Microsoft.OnAssignEntity",
9+ "property": "@{property}",
10+ "entity": "dimension",
11+ "actions": [
12+ {
13+ "$kind": "Microsoft.IfCondition",
14+ "condition": "equals(@dimension.units, dialogClass.schema.properties['@{property}'].$units)",
15+ "actions":[
16+ {
17+ "$kind": "Microsoft.SendActivity",
18+ "activity": "@{callSetMessage()}"
19+ },
20+ {
21+ "$kind": "Microsoft.SetProperty",
22+ "property": "$@{property}",
23+ "value": "=@dimension.number"
24+ }
25+ ],
26+ "elseActions":[
27+ {
28+ "$kind": "Microsoft.SendActivity",
29+ "activity": "@{callUnitsAlert()}"
30+ }
31+ ]
32+ }
33+ ]
34+ }
35+ ```
36+
37+ # callSetMessage
38+ - @\{setObjectPropertyMessage('@{property}',string(@dimension.number))}
39+
40+ # callUnitsAlert
41+ - @\{unitsAlert('@{property}')}
You can’t perform that action at this time.
0 commit comments