9.2) GenericValue Variables Type

While developing an automation process, there are situations where you are not sure what type of data will be retrieved. In order to find out, you need to run a few tests using a variable with a broad enough spectrum that can catch any type of input. This is where we recommend temporarily using GenericValue Variables. 

What is it?
The GenericValue (UiPath.Core.GenericValue) variable is a type of variable particular to UiPath that can store any kind of data, including text, numbers, dates, and arrays.

UiPath Studio has an automatic conversion mechanism of GenericValue variables, which you can guide towards the desired outcome by carefully defining their expressions. Please note that the first element in your expression is used as a guideline for what operation Studio performs. For example, when you try to add two GenericValue variables, if the first one in the expression is defined as a String, the result is the concatenation of the two. If it is defined as an Integer, the result is their sum.


What are some business scenarios in which I will use GenericValue variables?
  • Data is extracted from a UI field and forwarded to another workflow without processing
  • Two versions of the same Excel file are being compared column by column. The columns are different in terms of data type, the only relevant thing is which entries have changes 
            

No comments:

Post a Comment

Sequence and Flowcharts

  UiPath recommends that the first part of the Robot should start with Flowchart or Sequence. We can nest Sequence inside Sequence, Flowchar...