Worfklow insert condition on date

I have a sync project regarding a csv file. I need to write a record only if a particular field of the table is ugual to the current date (in the field I have the only the date, not the time, the time is always 00:00). I want to do that using a condition on the workflow? How to obtain this behavior?

Parents
  • If I understand you correctly... I think placing an 'System filter/Object filter' on the 'Scope' will be the best/cleanest option:

    From CSV > UNSAccountB
    So you filter the CVS entries based on ex. columnName: InsertDate <= Date.Today

    Target system > Scope
    Select Schema type > Object filter (*) Scripting

    ' If the column is defined as DateTime: 25/07/2025
    Return CBool(IIf($InsertDate$.Date <= Date.Today, True, False))

    ' If the column is defined as String: 25072025
    Return CBool(IIf(Date.ParseExact($InsertDate$, "ddMMyyyy", Nothing) <= Date.Today, True, False))

    If the 'Read-only access' option is not set under [Edit connection]
    Then you will get this error: The system object (1) has an invalid state (Thin).

    From UNSAccountB > CSV ('Read-only access' is not set under [Edit connection])

    One Identity connection > Scope
    Select Schema type: UNSAccountB > System filter
    CCC_Date <= CAST(GETDATE() AS DATE)

    (P.s. I think you also need to disable the revision filter for your use-case)

    HTH!

Reply
  • If I understand you correctly... I think placing an 'System filter/Object filter' on the 'Scope' will be the best/cleanest option:

    From CSV > UNSAccountB
    So you filter the CVS entries based on ex. columnName: InsertDate <= Date.Today

    Target system > Scope
    Select Schema type > Object filter (*) Scripting

    ' If the column is defined as DateTime: 25/07/2025
    Return CBool(IIf($InsertDate$.Date <= Date.Today, True, False))

    ' If the column is defined as String: 25072025
    Return CBool(IIf(Date.ParseExact($InsertDate$, "ddMMyyyy", Nothing) <= Date.Today, True, False))

    If the 'Read-only access' option is not set under [Edit connection]
    Then you will get this error: The system object (1) has an invalid state (Thin).

    From UNSAccountB > CSV ('Read-only access' is not set under [Edit connection])

    One Identity connection > Scope
    Select Schema type: UNSAccountB > System filter
    CCC_Date <= CAST(GETDATE() AS DATE)

    (P.s. I think you also need to disable the revision filter for your use-case)

    HTH!

Children
No Data