# Pass variable to argument inside state REFramework

**URL:** <https://forum.uipath.com/t/pass-variable-to-argument-inside-state-reframework/166360>\
**Category:** Help\
**Tags:** variable, reframework, question, system, activities\
**Created:** [November 8, 2019, 9:01am UTC](https://forum.uipath.com/t/pass-variable-to-argument-inside-state-reframework/166360 "2019-11-08T09:01:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Veselin\_Ganchev](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/veselin_ganchev/32/63217_2.png) [@Veselin\_Ganchev](https://forum.uipath.com/u/Veselin_Ganchev)\
**Post date:** [November 8, 2019, 9:01am UTC](https://forum.uipath.com/t/pass-variable-to-argument-inside-state-reframework/166360/1 "2019-11-08T09:01:00Z")

</div>

Hello,

I’m using REFramework.  
Inside of process.xaml I have If statement where one variable is taking value depends on is it true/false.  
But In Process Transaction on Exit statement I make one report that append everything from the transaction in one Excel file.

I need to append the value from the IF statement that take the variable.

This is my if statement with my variable Result(string)  
So she must be passed somehow to Process Transaction at Exit Statement.  
But when I start type the variable into my add row to append every single transaction to my report, variable is not existing.  
Maybe I need to pass the variable to argument? But How?

 ![post_notposted](https://global.discourse-cdn.com/uipath/original/3X/d/7/d7002a271f7159a3b438cf48abc160400a270675.png)

---

<div class="post-metadata">

**Author:** ![Palaniyappan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/palaniyappan/32/524095_2.png) [@Palaniyappan](https://forum.uipath.com/u/Palaniyappan)\
**Post date:** [November 8, 2019, 9:06am UTC](https://forum.uipath.com/t/pass-variable-to-argument-inside-state-reframework/166360/2 "2019-11-08T09:06:58Z")

</div>

> [@Veselin\_Ganchev](#):
>
> Maybe I need to pass the variable to argument? But How?

Fine  
kindly make sure that variable is set to global scope in the scope field of variable panel  
if not kindly create it as IN/OUT argument in the xaml where it is used so that it can be imported when using INVOKE WORKFLOW file activity and assign that to a global scope variable and use it anywhere along the process

Cheers @Veselin_Ganchev

---

<div class="post-metadata">

**Author:** ![Veselin\_Ganchev](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/veselin_ganchev/32/63217_2.png) [@Veselin\_Ganchev](https://forum.uipath.com/u/Veselin_Ganchev)\
**Post date:** [November 8, 2019, 9:12am UTC](https://forum.uipath.com/t/pass-variable-to-argument-inside-state-reframework/166360/3 "2019-11-08T09:12:29Z")

</div>

@Palaniyappan  
Hi,  
My variable can be only in scope ProcessTransaction.  
This is the most biggest scope I can give.  
Don’t give me to make it global. I don’t know why.

---

<div class="post-metadata">

**Author:** ![Veselin\_Ganchev](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/veselin_ganchev/32/63217_2.png) [@Veselin\_Ganchev](https://forum.uipath.com/u/Veselin_Ganchev)\
**Post date:** [November 8, 2019, 9:23am UTC](https://forum.uipath.com/t/pass-variable-to-argument-inside-state-reframework/166360/4 "2019-11-08T09:23:33Z")

</div>

@Palaniyappan  
Ok I found solution. Thanks for that you navigate me the right way.

- I make argument Result
- I use this argument the same way in IF statement like the variable
- Added to Exit Statement in the Process Transaction Invoke Workflow to invoke process.xaml
- Pass value to argument with ctrl+k as the image below.  
 ![invoke_argument](https://global.discourse-cdn.com/uipath/original/3X/7/1/71facbb9ed0051d657889cd984abf22abea5a12e.png)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [November 11, 2019, 9:23am UTC](https://forum.uipath.com/t/pass-variable-to-argument-inside-state-reframework/166360/5 "2019-11-11T09:23:38Z")

</div>

Closed on November 11, 2019, 9:23am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
