Skip to main content
Solved

Is there an easier way to parse numbers to strings and vice versa?

  • August 13, 2024
  • 2 replies
  • 365 views

Uzumaki
Forum|alt.badge.img+12

Is there a simple way to parse a number as a string and vice versa. It is cumbersome having to create a string variable and use the number->ToString action anytime that I create a number variable so that I can reference that variable as a string. Is there a way that I can parse the number as a string without creating a separate string variable.

Like how in java I could always say Integer.toString(myInt) instead of creating a string variable.

Thanks in advance

Best answer by Raul Jaimes

@Uzumaki 

Use $<YourStringVariable>.String:toNumber$ to convert the value of a string variable to a number variable.

Notice decimals will be removed.

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/using-variables/type-casting.html

 

HTH

Regards

2 replies

Raul Jaimes
Forum|alt.badge.img+9
  • Navigator | Tier 3
  • Answer
  • August 13, 2024

@Uzumaki 

Use $<YourStringVariable>.String:toNumber$ to convert the value of a string variable to a number variable.

Notice decimals will be removed.

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/using-variables/type-casting.html

 

HTH

Regards


Uzumaki
Forum|alt.badge.img+12
  • Author
  • Navigator | Tier 3
  • August 13, 2024

Awesome, thank you