Forum Discussion

Richard_Mayo's avatar
Richard_Mayo
New Contributor III
11 months ago

Confirmation rule frequency member filter - apply after a particular time

Hi Everyone,

Here's a (hopefully!) simple question to see if anyone has done this...

I want a confirmation to run but only after T#2022M12 and onwards so that if a workflow was ever run in the past for some reason then this confirmation rule would not be triggered.

I've played around with the Frequency Member Filter in confirmation rules but haven't got it to work. I want to to say something like:

"Where Time > 2022M12" but obviously in the correct syntax.

Is something like this possible?

Thanks!

Richard

  • You could write code into the rule to return True if the time is 2022 or prior. This doesn't prevent the rule from being triggered but will pass it regardless of the other conditions you're checking for it.

  • Hi Richard,

    Simple question, when do you want to apply it? I thought it's normally linked to the workflow from now onwards and for historical data, you can have other set of confirmation rules. Could you please expand?

    To answer to your question, you can recover the pov time like this:

    Dim timeId As Integer = api.Pov.Time.MemberId

    a result of the above would be 

    TimeId = 2018003000

    After that you can manipulate the value so that you skip the confirmation rule according to what you get in the TimeId value.

    Also consider that the 3-digit code after the year is not exactly the month:

    H1 = 001

    Q1 = 002

    M1 = 003

    M2 = 004

    M3 = 005

    Q2 = 006

    M4 = 007

    M5 = 008

    M6 = 009

    H2 = 010

    Q3 = 011

    M7 = 012

    M8 = 013

    M9 = 014

    Q4 = 015

    M10 = 016

    M11 = 017

    M12 = 018

    Best regards

    Carlos

  • chul's avatar
    chul
    Contributor III

    You could write code into the rule to return True if the time is 2022 or prior. This doesn't prevent the rule from being triggered but will pass it regardless of the other conditions you're checking for it.

  • Hi Richard,

    Simple question, when do you want to apply it? I thought it's normally linked to the workflow from now onwards and for historical data, you can have other set of confirmation rules. Could you please expand?

    To answer to your question, you can recover the pov time like this:

    Dim timeId As Integer = api.Pov.Time.MemberId

    a result of the above would be 

    TimeId = 2018003000

    After that you can manipulate the value so that you skip the confirmation rule according to what you get in the TimeId value.

    Also consider that the 3-digit code after the year is not exactly the month:

    H1 = 001

    Q1 = 002

    M1 = 003

    M2 = 004

    M3 = 005

    Q2 = 006

    M4 = 007

    M5 = 008

    M6 = 009

    H2 = 010

    Q3 = 011

    M7 = 012

    M8 = 013

    M9 = 014

    Q4 = 015

    M10 = 016

    M11 = 017

    M12 = 018

    Best regards

    Carlos

  • Richard_Mayo's avatar
    Richard_Mayo
    New Contributor III

    Thanks to both of you for your suggestions. I will put an if statement in the confirmation rule code to prevent it being run as you suggest. I was hoping to prevent it being triggered in the first place in the frequency filter to avoid code maintenance etc. but it's not too complex so will go with that.

     

    Thanks again.

    Richard