You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hub/apps/develop/action-framework/action-json.md
+104-1Lines changed: 104 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ The tables below describe the properties of the action definition JSON file.
115
115
| Property | Type | Description | Required |
116
116
|----------|------|-------------|----------|
117
117
| name | string | The variable name of the entity. This value is not localizable. | Yes |
118
-
| kind | string | A field name from the **ActionEntityKind** specifying the entity type. This value is not localizable. The allowed values are "None", "Document", "File", "Photo", "Text". | Yes |
118
+
| kind | string | A field name from the **ActionEntityKind**enumeration specifying the entity type. This value is not localizable. The allowed values are "None", "Document", "File", "Photo", "Text". | Yes |
119
119
120
120
### InputCombination
121
121
@@ -135,6 +135,109 @@ The tables below describe the properties of the action definition JSON file.
135
135
| inputData | A list of name/value pairs specifying additional data for URI actions. | No. Only valid for URI actions. |
136
136
137
137
138
+
## ActionEntityKind enumeration
139
+
140
+
The **ActionEntityKind** enumeration specifies the types of entities that are supported by the Action Framework. In the context of a JSON action definition, the entity kinds are string literals that are case-sensitive.
141
+
142
+
| Entity kind string | Description |
143
+
|-------|------------|-------------|
144
+
| "File" | Includes all file types that are not supported by photo or document entity types. |
145
+
| "Photo" | Image file types. Supported image file extensions are ".jpg", ".jpeg", and ".png" |
For information on using entity properties to create conditional sections in the action definition JSON, see [Where clauses](#where-clauses).
157
+
158
+
### File entity properties
159
+
160
+
| Property | Type | Description |
161
+
|----------|------|-------------|
162
+
| "FileName" | string | The name of the file. |
163
+
| "Path" | string | The path of the file. |
164
+
| "Extension" | string | The extension of the file. |
165
+
166
+
### Document entity properties
167
+
168
+
The *Document* entity supports the same properties as *File*.
169
+
170
+
### Photo entity properties
171
+
172
+
The *Photo* entity supports all of the properties of *File* in addition to the following properties.
173
+
174
+
| Property | Type | Description |
175
+
|----------|------|-------------|
176
+
| "IsTemporaryPath" | boolean | A value specifying whether the photo is stored in a temporary path. For example, this property is true for photos that are stored in memory from a bitmap, not stored permanently in a file. |
177
+
178
+
### Text entity properties
179
+
180
+
| Property | Type | Description |
181
+
|----------|------|-------------|
182
+
| "Text" | string | The full text. |
183
+
| "TextFormat" | ActionEntityTextFormat | The format of the text. |
184
+
| "ShortText" | string | A shortened version of the text, suitable for UI display. |
185
+
| "Title" | string | The title of the text. |
186
+
| "Description" | string | A description of the text. |
187
+
| "Length" | double | The length of the text in characters. |
188
+
| "WordCount" | double | The number of words in the text. |
189
+
190
+
## ActionEntityKind enumeration
191
+
192
+
The **ActionEntityTextFormat** enumeration specifies the types text formatting recognized by the "Text.TextFormat" entity property.
193
+
194
+
| Entity kind string | Description |
195
+
|-------|------------|-------------|
196
+
| "Plain" | Plain text. |
197
+
| "Markdown" | Markdown formatted text. |
198
+
199
+
## Where clauses
200
+
201
+
The action definition JSON format supports *where* clauses that can be used to implement conditional logic, such as specifying that an action should be invoked only when an entity property has a specified value.
202
+
203
+
The following operators can be used with *where* clauses.
204
+
205
+
| Operator | Description |
206
+
|----------|-------------|
207
+
| == | Equality |
208
+
|~= | Case-insensitive equality |
209
+
| != | Inequality |
210
+
| < | Less than |
211
+
| <= | Less than or equal to |
212
+
| > | Greater than |
213
+
| >= | Greater than or equal to |
214
+
|\|\|| Logical OR |
215
+
| && | Logical AND |
216
+
217
+
*Where* clauses use the following format:
218
+
219
+
```json
220
+
"where": [
221
+
"${<property_accessor>} <operator> <value>"
222
+
]
223
+
```
224
+
225
+
The following example shows a *where* clause that evaluates to true if a **File** entity has the file extension ".txt".
226
+
227
+
```json
228
+
"where": [
229
+
"${File.Extension} ~= \".txt\""
230
+
]
231
+
```
232
+
233
+
Multiple *where* clauses can be combined using the logical AND and logical OR operators.
0 commit comments