【问题标题】:Archer GRC: Formula based on setting current date between specific time framesArcher GRC:基于在特定时间范围内设置当前日期的公式
【发布时间】:2016-04-26 14:44:47
【问题描述】:

我有一个日期字段,我需要在 Archer 中使用一个公式。

当用户选择一个值字段 ValueField 并将值更改为“Pre-已批准”或“已批准”或“已更新”,如果是在早上 7 点之前,如果是在早上 7 点之后,则会显示下一个日期。

这是我目前所拥有的:

IF(AND(ISEMPTY([DateField]), "", IF(AND(NOT(ISEMPTY([DateField])), [???]=VALUEOF([???],"False")), DATEADD(DAY, 1, [ValueField]), ))

【问题讨论】:

    标签: archer rsa-archer-grc


    【解决方案1】:

    据我了解,你想要的是:

    算法:

    If ([ValueField] is changed to 'Pre-Approved', 'Approved' or 'Updated') AND (current time is before 7AM)
    then
    set [DateField] to current date
    
    Else If ([ValueField] is changed to 'Pre-Approved', 'Approved' or 'Updated') AND (current time is after 7AM)
    then
    set [DateField] to (current date+1)
    

    确保此公式位于 [DateField] 字段中。

    公式:

    IF(
    AND(HOUR(NOW())<7,OR([ValueField]=VALUEOF([ValueField],"Pre-Approved"),[ValueField]=VALUEOF([ValueField],"Rejected"),[ValueField]=VALUEOF([ValueField],"Updated"))),
    NOW(),
    IF(
    AND(HOUR(NOW())>7,OR([ValueField]=VALUEOF([ValueField],"Pre-Approved"),[ValueField]=VALUEOF([ValueField],"Rejected"),[ValueField]=VALUEOF([ValueField],"Updated"))),
    DATEFORMAT(DATEADD(DAY, 1, NOW()),"M/d/yyyy")
    )
    )
    

    您可以将其他验证添加到第一个 IF 语句的开头。

    感谢您让 Archer 社区在 stackoverflow 上发展壮大。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-17
      • 1970-01-01
      • 1970-01-01
      • 2015-02-13
      • 2014-06-03
      相关资源
      最近更新 更多