Skip to main content
Question

Table variable goes into an infinite loop

  • January 17, 2025
  • 4 replies
  • 29 views

Forum|alt.badge.img+7

We have a bot that that uses the Excel Basic: Get multiple cells action to populate a table variable. 

Then we have a “Loop for each row in table” action that loops through that table variable and inserts each row returned to a record variable.

This all worked fine until recently. The loop action goes into an infinite loop now even if no rows were found to populate the table. I confirmed this with a message bot which returned a count of how many records were in the table.

 

Has anyone else run into this.

4 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+10
  • Automation Anywhere Team
  • 569 replies
  • January 17, 2025

Got a screen shot of code you can share?

Have you tried isolating just the Excel Basic: Get multiple cells and Loop actions into a separate automation to see if something is interfering with the loop?


Forum|alt.badge.img+7
  • Author
  • Navigator | Tier 3
  • 31 replies
  • January 17, 2025

No, I haven’t tried that yet. This had been working before. December is when it stopped working only at the time I didn’t realize what was going on until now. 

Here is the table population command:

And here is the loop command

And here is  a snippet from the log

(1/17/2025 10:31:12 AM) ------Task Name: 04A_ReadEmail------Log Message : DCB table count: 0
(1/17/2025 10:31:13 AM) ------Task Name: 04A_ReadEmail------Log Message : Checked sorted table in file : C:\Bot006_HR_Onboarding_Process/MasterFilesDatabase/test.csv
(1/17/2025 10:31:15 AM) ------Task Name: 04A_ReadEmail------Log Message : DCB: ANALYZE OPEN
(1/17/2025 10:31:15 AM) ------Task Name: 04A_ReadEmail------Log Message : DCB Emp:  , 
(1/17/2025 10:31:17 AM) ------Task Name: 04A_ReadEmail------Log Message : DCB: ANALYZE OPEN
(1/17/2025 10:31:17 AM) ------Task Name: 04A_ReadEmail------Log Message : DCB Emp:  , 
(1/17/2025 10:31:19 AM) ------Task Name: 04A_ReadEmail------Log Message : DCB: ANALYZE OPEN

The DCB lines were the ones I added. As you can see it shows table count is 0. The other 2 DCB lines are inside the loop and as you can see they are repeated meaning the bot is looping through the table even though there  is nothing in it.

 

I talked with someone in AA and they said to raise a ticket.

 


Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+10
  • Automation Anywhere Team
  • 569 replies
  • January 17, 2025

Have you tried something like this?

Using this form of a Loop prevents you from having to read the entire Excel file into memory (into the data table).


Forum|alt.badge.img+1

Hola, 

  1. Prueba actualizando los Packages
  2. Prueba usando Excel Avanzado
  3. Elimina manualmente las filas “vacias” y prueba si sige infinito
  4. Puedes obtener el total de filas de la tabla y lo iteras hasta que lleges al total de filas y luego finalizas.
  5. Reinicia la pc :D

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