So i was wondering if we can pass a operator in a variable just as a string or something and then use that variable to do different kind of condition
i know it doesn’t make any sense but i just wanted to try something for fun
for eg :- variable “opt” which holds value of “<” and there are two int variables that holds two different amount one is less then another
now in a if condition how can i just add thes three varibale
if(num1 opt num2)
I believe we will not be able to convert a String value to an operator.
But for your case, if you do know the different types of operator that we could get in the Process or as request. Then we could use a
Switch Activity to map the operator to the proper case and then Execute the Operation/Create the Logic within that specific case.
Example Skeleton below :
@sagar.raval You can use This in assign activity as opt = chr(60)
but it does not work as condition
sorry i forget to mention is that the catch is we dont have to use any switch case
November 2, 2022, 10:40am
as mentioned by
@supermanPunch we cannot bypass the compiler and its compilation step.
Have a look here:
we would modell as
CInt(x) > 5 and CInt(x) <= 8
But lets loop in
@StefanSchnell as maybe we can integrate an inline compilation / execution e.g. with Roslyn and build a EVAL feature by ourself
And also here:
ClearScript from Microsoft is a dotNET assembly that makes it easy to add this kind of scripting to your UiPath workflow, because it contains the V8 engine in its native assembly packages. Compared to the approach of using Node.js, described in my tutorial, here the V8 engine is used via ClearScript and the integ…
as maybe the offered eval() functionality can be used / integrated
November 5, 2022, 10:41am
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.