Skip to content

No iterators work in the context of for_each Dataset.iterate #1050

@ozzieg

Description

@ozzieg

No counter works properly within the context of a "for_each" with a Dataset.iterate. It resets every single time so it never steps (NumberCounter) or goes up in date (Schedule.Event).

Here is a simple example where the "Counters.NumberCounter" and "Schedule.Event" date doesn't increment no matter what I do:

- object: Example
  for_each:
    var: sfts_object
    value:
      Dataset.iterate:
        dataset: csv-input/SFTSObject.csv
  fields:
    mycount:
      Counters.NumberCounter:
        start: 1
        step: 1000
    poop: ${{ mycount }}
    pooper: ${{ child_index }}
    sftsobject2: ${{ sfts_object.APIName }}
    stsfobjectId:
      reference: Example
    sftsobjectId2: ${{ sfts_object.Id }}
  friends:
    - object: Schedule
      nickname: snapshot_schedule
      count: 5
      fields:
        DateTime:
          Schedule.Event:
            start_date: 2022-01-01
            freq: weekly
      friends:
        - object: ExampleChild
          fields:
            nene: ${{ snapshot_schedule.DateTime }}
            kaka: ${{ Example.pooper }}
            shosho: ${{ Example.mycount }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions