How to use Assign Activity?

Hi Folks
Good Morning,
My question is :
I have two variable
1.Name = True
2.Name =(value) XYZ.
if the first variable is True Than I have to change Value in my workflow.
So, My Idea is…
First I will create two Assign variable one for True and another for the name and pass those value in a workflow is it right? or anyone has any good suggestion for that?
I have around 50 to 55 variable for this.

Any suggestion for that it would be a great help.
Thanks in Advance.
Happy Learning


Hi @ankur1984.

Check this

JsonString = JsonString.Replace(“{true}”,YourVariable0).Replace(“{xyz}”,YourVariable1)
Or string.format(json_data,value1,value2)


Thanks @AshwinS2 Can you please explain me in details. i have around 50 to 55 variable only for this. may be i will get this value from queue.

Thanks Again


Hi @ankur1984

Pass these variable through a dictionary

Ashwin S

1 Like

Thanks @AshwinS2 But i have 45 to 50 variable can you please explain me in details ?


Hi @ankur1984,
Your question is absolutely unclear. The title “Basic Knowledge” is also too vague.

Please read this How to ask a good question? before you ask again.


1 Like

Thanks @J0ska for your valuable time i appreciate that.


Not at all. Still not clear what the question is about.

The Assign activity is described here
or here
Working with variables is described here Managing Variables

But given your “Robot Master” badge I would expect you know all this.


Is simple i will get two value from Work queue. i am using JSOn File.
one is (True) & Second (XYZ)
If first one is true then i have to change value to XYZ
How can i do it?


You can do this through a decision, this is the easiest solution. You send the firs variable “One = True” as an argument, and in the second workflow, you can use a flow decision activity (if you use flowchart) or a if activity (if you have a sequence) where you check the value of variable “One”. in the decision statement, if value of var “One” is true → then variable “TWO” is “XYZ” else, do nothing.

If you need additional information, please let me know,

Hi @bianca Thank you for you time, I appreciate that.
i knew this solution,
But i have around 50 to 55 same type of value. so every time i have to use if activity or flow decision activity.
Any new suggestion for this ?



If it is the same variable that you check and there are 50 different values you should assign for it, you can try a Switch activity and as a main variable, you use the one that must be checked, and for each case you set a different value.

Hi @bianca Thank you again, i have 50 different value like Name, Surname, Id Card. , Email, Contact no. and so on… Can you please explain me with example ?.in details.


I understand now, and where do you have all this variables stored? If they are in an array or in a datatable, you can use a for each loop and when a value is found true, you replace it with a specific value

Hi @bianca those all value i will get from API. and make a Dictionary and Deserialize them.
So my question is for each value i have to make two variable is it ? one for true and another for value.


Yes, if the values are different you have to treat them individually

ok @bianca so we don’t have any option. :roll_eyes: Once again Thank you for your time.


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