Create your first automation in just a few minutes.Try Studio Web →
by YouTube
8
Activity
<100
Hello, This component is very interesting. But it don't seem i can use with a stopwatch variable for example. I have put the correct type of variable but it don't work. The value is always 0. Is this activity can be operational on this type of variable ? Thanks
Hi Manoj,
This seems to be a great component because I am trying to create a reusable component with a scope activity. I want to create a variable that can pass across all activities in the component.
So how exactly do I use these two activities? Set and Get? Can you provide a sample?
You said: "You declare the variable on page1 keep it in setter and fetch the value wherever required using getter."
So I declared the variable on page1 with a set activity. But how do I fetch the value in another xaml file?
Hi Surya,
I'll definately help you on this. Since you have already used set activity in your project, the only thing remaining is to fetch the value of the variable on a different page. For this, you need to use get activity with following parameters
Name : This field will contain the same name which you give in the name property of set activity .
TypeArugemnet : This contains the datatype of the variable. I would recommend to use the same datatype which you give while selecting the typeargument of set activity(this is to avoid any typecasting issue).
Value: this is where you get your output and the datatype of this variable would be same as your typeargument property.
Try this and let me know if you face any issue.
Hi Manoj ,
I am just wondering what prompted you to create this custom activity.
Was there any business scenario where you were finding it cumbersome to use arguments?
Minal
Hi Minal,
The idea behind developing this feature is to help developers in achieving their work effectively.
If I take an example of REF here, in REF the config variable of type dictionary which stores the data from input excel and pass it to other pages using arguments. You need to sometimes pass this variable sometimes to those page where you don't need them actually, you only pass it so that it can be pass to another page for actual use. This creates performance overhead as same variable is created many times in memory and it gets more difficult to manage the code when you need to use the variable at the last page and you need to pass it again and again to the intermediate pages for no reason in form of arguments. If we need the same variable at some other place where the scope is not present, then again we have to use arguments in all the intermediate pages and this makes the code cumbersome and clumsy as well. With this you can declare once and use anywhere.
Hi Manoj ,
I am just wondering what prompted you to create this custom activity.
Was there any business scenario where you were finding it cumbersome to use arguments?
Minal
Duplicate Question.
Answer already provided.
License & Privacy
MIT
Privacy Terms
Technical
Version
1.0.4Updated
February 18, 2020Works with
2018.4
Certification
Silver Certified
Tags
Support
UiPath Community Support