Update Process Element rpa.item.update
Scope:
rpaWho can execute the method: any user
This method updates the element with the identifier id of the process with the identifier typeId.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
typeId |
Identifier of the process |
|
id |
Identifier of the element |
|
fields* |
Object with values of custom fields of the element |
Parameter fields
|
Name |
Description |
|
stageId |
Identifier of the stage |
|
UF_RPA_... |
Values of custom fields. The format for passing values depends on the field type |
Code Examples
-
Upload a new file instead of the old one (non-multiple field)
To replace a file in a non-multiple field, simply upload the new file. The old one will be automatically deleted.
JS{ "fields": { "UF_RPA_1_1585069397": [ "myfile.pdf", "...base64_encoded_file_content..." ] } } -
Remove the value of a custom file-type field
To do this, simply pass an empty string
''instead of the value. -
Keep the value of a non-multiple file-type field unchanged
The simplest option is to not add a key for this field in
fields. However, if you need to pass it and not change it, you should pass a list where the keyidcontains the identifier of the file.JS{ "fields": { "UF_RPA_1_1585069397": { "id": 433 } } }Warning
If a value different from the current one is passed in
id, the field value will be reset and the file will be deleted. -
Working with a multiple file-type field
The value of a multiple field is an array. Each element of the array follows the same rules as for non-multiple values.
-
Partial overwrite of a multiple file-type field value
For example, currently the multiple file-type field contains the values
[12, 255, 44].You need to keep files
12and44, and upload a new file instead of255.The request should look as follows:
JS{ "fields": { "UF_RPA_1_1585069397": [ { "id": 12 }, { "id": 44 }, [ "myNewFile.pdf", "...base64_encoded_file_content..." ] ] } }
Continue Learning
- Elements: Overview of Methods
- Add Process Element rpa.item.add
- Get Information About the rpa.item.get Element
- Get Data on Current Tasks of the rpa.item.getTasks Element
- Get an Array of Process Items rpa.item.list
- Delete Element rpa.item.delete