I have here the IF_statement_Stoat.xaml and there is a argument called stoatResult (out) then in my STOAT.xaml I used to invoke the arguments stoatResult (out) then in my main project I invoke the STOAT.xaml and try to get the value of stoatResult via Message Box. For your assistance. What is the proper used of IN/OUT.
Awesome
usually there are four types of argument direction In – the argument can only be used within the given project. Out – the argument can be used to pass data outside of a given project. In/Out – the arguments can be used both within and outside of a given project. Property – not currently used.
and usually while naming the arguments mention this direction as well so that we wont find difficult to identify which is variable and which is argument
like this in your case out_stoatResult is your argument
where stoatResult is your variable
this will avoid confusion and kindly try with this and let know for any queries or clarification
Hi
welcome to uipath community
for this string input str_input = “bb/aa+CC”
the output would be like this str_output = str_input.Replace(“/”,“”).Replace(“+”,“”)
or with split method str_output = String.Join(“”,Split(String.Join(“”, Split(str_input,“/”)),“+”))
So is it safe to used the “In/Out”? What do you mean by project is it the xaml file? transferring of argument from one project to another. Just got confuse. Thanks!
no buddy unless we need to intentionally,
we can use IN if its going to be used in that xaml alone i.e., that workflow alone
or OUT if we need that to be used in other workflows as well
Project is that workflow or that xaml where we are creating this arguments
yah
no worries let me explain
usually to share a value within a workflow or within a xaml then we will be using Variables
but if we want that values to be used in other workflows as well or other xaml from the current xaml, then we need to declare ARGUMENTS in the xaml with OUT Type
or if we have a xaml A and we want the arguments or others variables outside the xaml A then we need to create arguments with type IN and pass those variables as input value while invoking the xaml A with INVOKE WORKFLOW FILE activity
Then in that’s case we can use REGEX like this
With expression [a-zA-Z0-9]+ in the MATCHES ACTIVITY with the string input passed
—get the output with a variable named out_matches
—now use a FOR EACH activity and pass the above variable out_matches as input and change the type argument as System.Text.RegularExpressions.Regex
—inside the loop use a writeline activity like this item.ToString
I am getting a each arthmetic operator in for each but now how to use that operator to split and get the result.
For ex: I got a result with Vari1=+
then I am splitting with Vari2 = Split.("Vari1"c) but encountering an error ‘character constant must contain exactly one character’
This will give us actually the value after siting the string from those delimiters and that can be obtained within the for each loop one by one
Or if we want without looping we can mention the index position where it starts from 0 for the first splitted element
String = (Automate1+Automate2*Automate3/Automate1)
I want to get the operators from String and need to split using operators and then need to follow other steps like inserting other values based on result