12.2 SDK fieldAction: Difference
This SDK function allows you to perform the difference between 2 or more values that must be passed as parameters.
Being a fieldAction type function, it can be called within the individual fields of modules or dynamic forms.
EXAMPLE OF USE
To better understand how it works, below is an example of using the vte_diff() function to perform the difference between the values of two fields called "Expected hours" and "Used hours" and save the result in the "Remaining hours" field (Figure 1)
Figure 1
Within an Action Task we proceed with the configuration of an Update Entity action involving the "Remaining Hours" field.
Specifically, we are going to call the interested SDK function through the "Option Selection" picklist and accessing the "SDK Functions" section (Figure 2)
Figure 2
Finally we pass as parameters (separated by commas) the contents of the two fields to be subtracted (Figure 3)
Figure 3





