diff --git a/ui-ngx/src/assets/help/en_US/scada/tag_click_action_fn.md b/ui-ngx/src/assets/help/en_US/scada/tag_click_action_fn.md
index 54552d9455..2ff6b87569 100644
--- a/ui-ngx/src/assets/help/en_US/scada/tag_click_action_fn.md
+++ b/ui-ngx/src/assets/help/en_US/scada/tag_click_action_fn.md
@@ -12,9 +12,8 @@ A JavaScript function invoked when user clicks on SVG element with specific tag.
- ctx:
ScadaSymbolContext - Context of the SCADA symbol.
- - element:
Element - SVG element.
- See Manipulating section to manipulate the element.
- See Animating section to animate the element.
+ - element:
Element - SVG.js element.
+ See the examples below to learn how to manipulate and animate elements.
- event:
Event - DOM event.
@@ -26,15 +25,23 @@ A JavaScript function invoked when user clicks on SVG element with specific tag.
* Set new value action
+*callAction: (event: Event, behaviorId: string, value?: any, observer?: Partial\\>): void*
+
+*setValue: (valueId: string, value: any): void*
+
+Avoid manually setting behavior values, as shown in the example, see best practice for Device Interaction
+
```javascript
var active = ctx.values.active;
-var action = active ? 'inactive' : 'active';
+var action = active ? 'turnOn' : 'turnOff';
-ctx.api.callAction(event, action, undefined, {
+ctx.api.callAction(event, action, active, {
next: () => {
+ // To simplify debugging in preview mode
ctx.api.setValue('activate', !active);
},
error: () => {
+ // To simplify debugging in preview mode
ctx.api.setValue('activate', active);
}
});
diff --git a/ui-ngx/src/assets/help/en_US/scada/tag_state_render_fn.md b/ui-ngx/src/assets/help/en_US/scada/tag_state_render_fn.md
index 8d356281f4..c16ad96c58 100644
--- a/ui-ngx/src/assets/help/en_US/scada/tag_state_render_fn.md
+++ b/ui-ngx/src/assets/help/en_US/scada/tag_state_render_fn.md
@@ -12,9 +12,8 @@ A JavaScript function used to render SCADA symbol element with specific tag.
- ctx:
ScadaSymbolContext - Context of the SCADA symbol.
- - element:
Element - SVG element.
- See Manipulating section to manipulate the element.
- See Animating section to animate the element.
+ - element:
Element - SVG.js element.
+ See the examples below to learn how to manipulate and animate elements.