Hi Community,
I’m building an Iterative Macro for a cursor-based API (Repsly v3):
GET https://api.repsly.com/v3/export/clients/{lastTimeStamp}Pattern:
- Start with lastTimeStamp = 0
- Each response returns MetaCollectionResult.LastTimeStamp and TotalCount
- Continue while TotalCount > 0
Macro Input schema (and expected Iterative Output schema):
- base_url (V_String512)
- api_user (V_String512)
- api_pass (V_String512)
- lastTimeStamp (Int64)
What works:
- First iteration: URL = …/clients/0, Authorization OK.
- Download returns HTTP 200 and JSON with MetaCollectionResult.LastTimeStamp = 5322764819.
- Before Iterative Output: Browse shows 1 row, 4 fields, updated lastTimeStamp = 5322764819.
Guards applied:
- Select before Loop → only 4 fields, exact types.
- Sample (First N=1) before Loop → guarantees one row.
- Output Mode = Auto Configure by Name.
- Interface Designer: Iteration Input = Macro Input, Iteration Output = Loop.
Issue: Despite all this, the second iteration sometimes starts again with the initial input row (lastTimeStamp = 0), as if the macro ignores the Loop output.
Design details:
Questions:
- Can multiple rows or schema drift (e.g., V_WString from JSON) cause the engine to fallback to the initial Macro Input row, even if Browse before Loop shows 1 row / 4 fields?
- Is the recommended pattern to enforce Select + Sample immediately before Loop (we did this)?
- Any best practices when using Append Fields for meta logic so they don’t interfere with Loop payload?
- How to inspect/log the actual record passed from Iterative Output to the next iteration?
Thanks in advance! Happy to share the macro or anything else if needed.