isError
Check whether given entry/entries returned an error. Use ${lastCompletedTaskEntries} to check the previous task entries. If array is provided, will return yes if one of the entries returned an error.
javascript · Common Scripts
Details
| ID | isError |
|---|---|
| Language | javascript |
| From Version | 5.0.0 |
| Tags | Condition Utility |
README
Checks whether a given entry(ies) return an error. Use ${lastCompletedTaskEntries} to check the previous task entries. If an array is provided, it will return “yes” if one of the entries returned an error.
Script Data
| Name | Description |
|---|---|
| Script Type | javascript |
| Tags | Condition, Utility |
Inputs
| Argument Name | Description |
|---|---|
| entryId | The entry to check. |
Outputs
| Path | Description | Type |
|---|---|---|
| True | If one or more entries is an error. | Unknown |
| False | If none of the entries is not an error. | Unknown |
entryIds = (Array.isArray(args.entryId)) ? args.entryId : [args.entryId]; for(var entryIdx=0; entryIdx < entryIds.length; ++entryIdx) { res = executeCommand("getEntry", {"id":entryIds[entryIdx]}); for (var resIdx=0; resIdx < res.length; ++resIdx) { if (isError(res[resIdx])) { return 'yes'; } } } return 'no';