【问题标题】:Check a date field is blank or empty in MS Flow expression检查 MS Flow 表达式中的日期字段是否为空白或为空
【发布时间】:2018-10-10 12:27:44
【问题描述】:

作为流程中电子邮件步骤的一部分,我们正在创建一个 HTML 表格,其中某些行使用 css 隐藏。

所以我们的表达式公式(在 Outlook - 从共享邮箱发送电子邮件 步骤的正文中如下所示:

if(
And(
    Or(
        equals(triggerBody()['DD_Artwork']['Value'], 'Bargain New Store')
        , equals(triggerBody()['DD_Artwork']['Value'], 'Home & Fashion')
        ,equals(triggerBody()['DD_Artwork']['Value'], 'Home Store'))
    , @empty(triggerBody()?['StoreOpeningDate']))
,'tr.StoreOpenDate {display:visible}', 'tr.StoreOpenDate {display:none}')

这部分,检查日期选择器字段 StoreOpeningDate 不起作用:

, @empty(triggerBody()?['StoreOpeningDate']))

我们也试过了:

, Not IsBlank(triggerBody()?['StoreOpeningDate']))

, Not IsEmpty(triggerBody()?['StoreOpeningDate'])) 

甚至:

, Not equals(triggerBody()?['StoreOpeningDate']), '')

但我们总是收到错误消息表达式无效

那么正确的方法是什么?

【问题讨论】:

    标签: power-automate


    【解决方案1】:

    我遇到了类似的问题。 TriggerBody() 函数正在造成损害。只需使用 Empty(item()?['DateField']) 在条件中不等于 false。

    【讨论】:

    • 对不起,以上没有用。使用字段名称,应用不等于并且右侧的 Null 表达式有效。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-08
    • 1970-01-01
    • 2011-01-25
    • 2014-04-28
    相关资源
    最近更新 更多