Skip to main content
Solved

Swap String variable


Forum|alt.badge.img+5

HI team,

How can we swap tow strign variable with out third variable in automation anywhere?

Can anyone please help me.

thank you.

Best answer by Sai1212

Hi @Jitendriya ,

 

Lets take an example of two Strings i.e

str1 = abc

str2 = def

Assume that above two variables you have created and initialized on the taskbot as above

Now, add below snippet, which should swap two string values.

 and here is the OP:

 


Hope it helps you out.

Sai Teja Gayala

View original
Did this topic help answer your question?

3 replies

Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 17 replies
  • Answer
  • May 5, 2023

Hi @Jitendriya ,

 

Lets take an example of two Strings i.e

str1 = abc

str2 = def

Assume that above two variables you have created and initialized on the taskbot as above

Now, add below snippet, which should swap two string values.

 and here is the OP:

 


Hope it helps you out.

Sai Teja Gayala


Forum|alt.badge.img+5
  • Author
  • Navigator | Tier 3
  • 22 replies
  • May 5, 2023
Sai1212 wrote:

Hi @Jitendriya ,

 

Lets take an example of two Strings i.e

str1 = abc

str2 = def

Assume that above two variables you have created and initialized on the taskbot as above

Now, add below snippet, which should swap two string values.

 and here is the OP:

 

Hope it helps you out.

Sai Teja Gayala

Thank you Sai, you did it very simple way thank you once again.


rohit.k2
Cadet | Tier 2
Forum|alt.badge.img+1
  • Cadet | Tier 2
  • 7 replies
  • May 5, 2023

Using Clipboard action we can achieve this.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings