Skip to main content
Solved

Bot has over 100 of Input and output varibles, How to reduce?

  • April 3, 2025
  • 4 replies
  • 77 views

Forum|alt.badge.img+3

Bot having more that 100 input and output variables, Is there any way to reduce the variable count ?

 

And confirm, Keeping more that 100 variables in bot -will it cause any bot performance?

Best answer by Marc Mueller

Hi ​@Ajith 9655,

how should we know which variables you can remove from your code? 🤔

What you can try is this (quick clean up):

Click the three dots → Remove unused variables → Check which are not used and click delete button

 

 

 

Hope this will help!

 

Cheers

Marc

4 replies

Marc Mueller
Most Valuable Pathfinder
Forum|alt.badge.img+17
  • Most Valuable Pathfinder
  • Answer
  • April 3, 2025

Hi ​@Ajith 9655,

how should we know which variables you can remove from your code? 🤔

What you can try is this (quick clean up):

Click the three dots → Remove unused variables → Check which are not used and click delete button

 

 

 

Hope this will help!

 

Cheers

Marc


Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+14
  • Automation Anywhere Team
  • April 3, 2025

Marc has the correct answer to removing unused variables. The other question was will the large number of variables affect performance? No, it won’t. It’s difficult to keep track of though.

Given the number of variables, I would imagine the task bot itself is quite long too. To make this more manageable, consider breaking up a large task bot into smaller parent-child bots. You can also use Processes to manage things a bit better.


KhaledMostafaMe
Most Valuable Pathfinder
Forum|alt.badge.img+6
  • Most Valuable Pathfinder
  • April 4, 2025

I would also suggest using a dictionary, as it can store multiple key-value pairs efficiently.


balwant.bora
Cadet | Tier 2
Forum|alt.badge.img+4
  • Cadet | Tier 2
  • April 4, 2025

Hi,

In order to reduce number of variables you can set the same in code analysis having the maximum number of variables.

Restrict the Number of Input and Output Variables

 

Regards

Balwant Bora