Skip to main content
Question

RPA BOT moving to next record in Table in Workday

  • Apr 10, 2026 5:46 PM UTC
  • 2 replies
  • 77 views

Hello,  

I am building an automation that processes different transfers in a Workday report.  The report lives in Workday and if a record in this report needs to be skipped I want it to go to the next record.  

I currently have it set up for a Loop based on the total records in the report.  Has anyone build an automation that would skip various records if needed.  

Thanks! 

2 replies

Forum|alt.badge.img
  • Automation Anywhere Team
  • Oct 15, 2026 8:14 PM UTC

Skipping Records in a Loop – Workday Report Processing

Understanding the Pattern

The core concept is to use conditional logic (If/Else) inside your loop to evaluate whether a record should be processed or skipped, combined with AA's Loop: Continue action (equivalent to a continue statement in programming — it skips the rest of the current iteration and moves to the next record).

Recommended Approach: Using Loop: Continue

This is the cleanest and most recommended method in Automation 360.

Basic Structure:

Loop (Counter: 1 to TotalRecords)
│
├── [Get current record data from Workday / DataTable]
│
├── If (condition to SKIP this record is TRUE)
│ └── Loop: Continue ← Skips to next iteration immediately
│
└── [Process the record normally if not skipped]
├── Step 1...
├── Step 2...
└── Step 3...

How it works:

The Loop: Continue action tells AA to immediately jump to the next iteration of the loop, skipping all remaining actions below it in the current iteration.

This is available in Automation 360 under: Loop package → Continue

Common Skip Conditions for Workday Reports

Here are typical conditions you might want to skip a record on:

Skip Condition Example
Record status is not applicable If Transfer_Status = "Cancelled"
Required field is empty/blank If Employee_ID = ""
Record already processed If Processed_Flag = "Y"
Transfer type not in scope If Transfer_Type <> "Lateral"
Dollar amount is zero If Transfer_Amount = 0
Date is outside range If Effective_Date < Today

Full Implementation Pattern

Step 1: Load the Workday Report into a DataTable

// Option A: If exported as CSV/Excel from Workday
Excel: Open Workbook → Read All Rows → Store in DataTable variable ($WorkdayData$)

// Option B: If using Workday Web UI scraping
Loop through Workday report pages → Extract data → Store in DataTable

Step 2: Get Total Record Count

DataTable: Get Total Rows → Store in Number variable ($TotalRecords$)

Step 3: Loop with Skip Logic

Loop: Iterator (Counter from 0 to $TotalRecords$ - 1)
│ [Counter variable: $RowIndex$]
│
├── DataTable: Get Cell → Row: $RowIndex$, Column: "Status"
│ → Store in String variable ($RecordStatus$)
│
├── DataTable: Get Cell → Row: $RowIndex$, Column: "EmployeeID"
│ → Store in String variable ($EmployeeID$)
│
├── // ─── SKIP CONDITIONS ───
│
├── If ($RecordStatus$ = "Cancelled")
│ └── Loop: Continue
│
├── If ($EmployeeID$ = "")
│ └── Loop: Continue
│
├── If ($RecordStatus$ = "Processed")
│ └── Loop: Continue
│
└── // ─── PROCESS THE RECORD ───
├── [Navigate to Workday transfer screen]
├── [Fill in transfer details]
├── [Submit / Save]
└── [Log success to output file]

Enhanced Pattern: With Logging and Error Handling

For production-grade automation, add logging for skipped records:

Loop: Iterator (Counter from 0 to $TotalRecords$ - 1)
│
├── Get record data → $RecordStatus$, $EmployeeID$, $TransferType$
│
├── If ($RecordStatus$ = "Cancelled" OR $EmployeeID$ = "")
│ ├── // Log the skipped record
│ ├── String: Append → "$EmployeeID$ skipped – Reason: $RecordStatus$"
│ ├── Log to File (SkippedRecords.csv)
│ └── Loop: Continue ← Skip to next record
│
├── Try
│ ├── [Process the transfer in Workday]
│ └── [Log success]
│
└── Catch (on error)
├── [Log failure with record details]
└── Loop: Continue ← Skip failed record, don't stop entire bot

Tracking Counts (Processed / Skipped / Failed)

Add counter variables to track outcomes for reporting:

// Initialize before loop
Number: Assign → $ProcessedCount$ = 0
Number: Assign → $SkippedCount$ = 0
Number: Assign → $FailedCount$ = 0

// Inside loop - on skip:
Number: Increment → $SkippedCount$
Loop: Continue

// Inside loop - on success:
Number: Increment → $ProcessedCount$

// Inside loop - on failure:
Number: Increment → $FailedCount$

// After loop - summary:
Message Box: "Processed: $ProcessedCount$ | Skipped: $SkippedCount$ | Failed: $FailedCount$"

Key Tips for Workday Report Processing

Tip Detail
Use DataTable for report data Load the Workday report as a DataTable for efficient row-by-row processing
Use Loop: Continue not Loop: Exit Continue skips to next record; Exit stops the entire loop
Log all skipped records Always write skipped records to a log file with the reason for skipping
Handle empty DataTable Add a check before the loop: If TotalRecords = 0 → Exit bot gracefully
Use column names not indexes Reference DataTable columns by name (e.g., "Status") not index number for maintainability
Workday session timeout For large reports, add session keep-alive logic to prevent Workday from timing out mid-loop

Important: Loop: Continue vs Loop: Exit

Action Behavior
Loop: Continue Skips remaining actions in current iteration → moves to next record
Loop: Exit Stops the entire loop → no more records processed

Always use Loop: Continue for skipping individual records.

References

  • AA Loop Package Docs: https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/loop-package.html
  • AA DataTable Package: https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/data-table-package.html

  • Cadet | Tier 2
  • Oct 18, 2026 1:10 PM UTC

Thank you for information