Difference between getVal and setVal functions

Q:- What is the difference between the getVal () and setVal () functions in the vFlow designer? What scenarios is the setVal () function used in?

5 Likes

getVal() is used to retrieve a value from a data path.
For instance, getVal(“tempObject.key”) will get the value from the path tempObject.key

setVal() is used to set a value on a data path.
To set the value on a datapath, use setVal(“getVal(‘tempObject.key’)”,“1234”)
Here, value 1234 will be set on the path tempObject.key

setVal() can be used in scenarios where user wants to set any data on a particular datapath.

36 Likes

setVal() function configuration in CONTROL COPY task:
Screenshot from 2023-09-12 20-10-22

Before the task execution:

After the task execution:

35 Likes

getVal() function configuration in CONTROL COPY task:
Screenshot from 2023-09-12 20-21-59

35 Likes