RPA for Newbies: Bot "Grammar"

  • 19 March 2021
  • 0 replies
  • 123 views

Userlevel 6
Badge +9

 

Welcome to RPA Tips for Newbies - where Automation Anywhere experts offer advice for those just starting to learn RPA. Micah Smith, resident Developer Evangelist, and Jon Stueve, manager of Automation Anywhere University, chat about some of the advice they wish they had gotten when they were first learning to become RPA developers. In this video, they discuss the importance of grammar in coding your bots.

 

  1. Is This Case-Sensitive?

    • Everything is case-sensitive...even when it's not. Put another way, if you always make sure to create and reference your variables and bot references as if they are case sensitive, you can never be wrong.
    • Technically is everything case sensitive? No, but if you're always paying close attention to the way you name and reference things - and always end up using the same case-approach, you can never be wrong.
    • Actionable Tip: Establish a standard pattern for the way you will name and reference all of your variables. A common approach in the Automation Anywhere development community is referred to as 'Hungarian Naming Convention' where variables are pre-fixed with a single character representing their data type, followed by the actual name of the variable written in camel-case.
      • For example, if we were creating a String value to store a first name, that variable might be named: sFirstName...where s is a reference to the fact that it's a String.
  2. Small Errors are often caused by errors in punctuation and spelling

    1. Often developers will mis-spell a variable when originally defining it, and spell it differently when referencing within their bot.
    2. Example: a String variable named "sFrstName" is created, but in the Log to file action, the variable sFirstName is mapped to be written out each time through a loop.
    3. In this example, because the variable was named incorrectly, and because the user manually typed the output for the Log to File action - the bot would have an error that may not be immediately obvious to a user trying to understand what's wrong.
    4. Actionable Tip: Leverage the variables explorer by pressing F2 on your keyboard whenever filling a variable into a field. When you're selecting a variable from a list, you don't have to worry about spelling errors, nor do you have to worry about typing it wrong.

 

Conclusion


Variables enable bots (and the data they store/use) to be much more dynamic. When creating and referencing variables within your own bot builds, be sure that you've established a naming standard that can be followed by yourself as well as the other developers you collaborate with. Additionally, make sure that as you create and reference variables, that you're always using the variables explorer to appropriate select and reference variables in an effort to avoid references to variables that may not exist due to variable naming issues.

If you enjoyed this content and want to take it further, head over to the RPA training materials at Automation Anywhere University. Choose from a rich library of online courses, role-based learning trails, and instructor-led training classes leading to industry-recognized RPA certifications. Visit Automation Anywhere University and start learning RPA today!


0 replies

Be the first to reply!

Reply