01-19-2024 10:40 AM
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
Solved! Go to Solution.
01-19-2024 11:48 AM
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.
01-19-2024 11:52 AM
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
01-19-2024 11:48 AM
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.
01-19-2024 11:52 AM
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
01-26-2024 10:19 AM
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