Skip to main content
Solved

Modulo Operation in A360

  • December 8, 2022
  • 5 replies
  • 1991 views

Forum|alt.badge.img+1

Hello,

I am trying to migrate my bots from v11 to A360.

But the modulo operator (%) in number assign action does not work.

Am I missing something or is there another way to calculate modulo?

Thanks.

 

Best answer by Padmakumar

HI @yaskar ,

 

If I am not mistaken, currently we don’t have any option to use Modulo operator in A360. But you can still get it worked by following either of the following method.

 

  • Try using the VB/Java/python Script to find Mod (Easy way)

or

  • Using the Loop-While action as shown below (A bit tricky)

 

or

View original
Did this topic help answer your question?

5 replies

Padmakumar
Forum|alt.badge.img+13
  • Navigator | Tier 3
  • 785 replies
  • Answer
  • December 8, 2022

HI @yaskar ,

 

If I am not mistaken, currently we don’t have any option to use Modulo operator in A360. But you can still get it worked by following either of the following method.

 

  • Try using the VB/Java/python Script to find Mod (Easy way)

or

  • Using the Loop-While action as shown below (A bit tricky)

 

or


Paul Hawkins
Forum|alt.badge.img+7
  • Navigator | Tier 3
  • 1078 replies
  • December 8, 2022

@yaskar I’d convinced myself there was a math package out of the box from AA that allowed you to do this, but the best I could find was this on the store

https://botstore.automationanywhere.com/bot/calculator-package

For simplicity though, I would agree with @Padmakumar that you can achieve this quite simply with some python


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • 1 reply
  • December 12, 2022

Thank you both! @Padmakumar @Paul Hawkins 


sasi 9326
Forum|alt.badge.img
  • Cadet | Tier 2
  • 1 reply
  • April 6, 2023

simple: use this mathematical formula 

a = 10, b = 3, quotient, remainder;
quotient = a / b; // quotient is 3
remainder = a - (quotient * b); // remainder is 1 😀


Forum|alt.badge.img

Simply use the Boolean “to String action”, by dividing the number with 2.


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