Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
|
...
pageId, workflowState, [comment |
|
...
]) | Package | comala | Alias | | Pkg Usage | |
|
Description
Excerpt |
---|
|
Sets the workflow state of the page using the Comala |
...
Document Management add-on. |
Parameters
...
Parameter name
...
Type
...
Required
...
Description
...
json
...
string
...
Yes
...
The JSON to be converted.
Return type
variable return type - depending on the left hand side operator type
Examples
Both examples show how JSON data can be parsed into an array or struct collections. Both examples use the following struct definitions:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | struct code {
number [] rgba;
string hex;
}
struct color {
string color;
string category;
string type;
code code;
}
struct colors {
color [] colors;
}
|
Example 1 - Reading JSON from a file
16 17 18 19 20 21 22 | string json = readFromTextFile( "C:\\colors.json" );
colors cData;
cData = fromJson(json);
return cData.colors[0].color;
|
Example 2 - Reading JSON from a variable
16 17 18 19 20 21 | string json = "{\"colors\":[{\"color\":\"red\",\"category\":\"hue\",\"type\":\"primary\",\"code\":{\"rgba\":[255,0,0,1],\"hex\":\"#FF0\"}}]}" ;
colors cData;
cData = fromJson(json);
return cData.colors[0].color;
|
See also
...
Page:
httpGet
...
Page:
httpDelete
...
Page:
httpOptions
...
Page:
httpPatch
...
Page:
httpPost
...
Page:
httpPut
...
Page:
httpCreateCookie (Cloud)
...
Page:
httpGet (Cloud)
...
Page:
httpGetErrorMessage (Cloud)
...
Page:
httpDelete (Cloud)
...
Page:
httpCreateParameter (Cloud)
...
Page:
httpCreateHeader (Cloud)
...
Page:
httpBasicAuthHeader (Cloud)
...
Page:
fromJson (Cloud)
...
Sets the workflow state of the page using the Comala Document Management add-on.
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
pageId | Integer | Yes | The selected page to change the workflow state on. | workflowState | String | Yes | Name of the workflow state to be set to. | comment | String | Yes | Comment to be added to the Comala workflow history. | |
Return Type
Boolean
Example
Code Block |
---|
|
return comalaSetState(getPage("TST", "Demo Page"), "Approved", "Page was approved by: " + currentUserFullName()); |
Returns 'true'
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "comala_routines" and space = currentSpace ( ) |
---|
labels | array_routines |
---|
|
We've encountered an issue exporting this macro. Please try exporting this page again later.