PowerApps TimeUnit.XXX 自更新以来不再被识别?

huangapple go评论73阅读模式
英文:

PowerApps TimeUnit.XXX no longer recognized since Update?

问题

以下是翻译好的部分:

一切都运行正常,直到1-2天前的组件更新。在没有对我的特定代码块进行任何更改的情况下,TimeUnit.anything不再被识别。我仍然可以在画布应用区域中使用TimeUnit.Hours等内容,问题只出现在组件选项卡中。

为什么会出现这个错误?TimeUnit.XXX是一个内置函数...

在我的PowerApps应用中,我有一个具有“function”getTextFromTimeRounded的组件,如下图所示:

PowerApps TimeUnit.XXX 自更新以来不再被识别?

我的代码:

If(
    IsBlankOrError(timeValue);
    "";
    DateDiff(Now(); timeValue; TimeUnit.Hours) >= 24;
    $"ca. {Round(DateDiff(Now(); timeValue; TimeUnit.Hours) / 24; 0)} Tag(en)";
    DateDiff(Now(); timeValue; TimeUnit.Minutes) >= 60; 
    $"ca. {Round(DateDiff(Now(); timeValue; TimeUnit.Minutes) / 60; 0)} h";
    $"{DateDiff(Now(); timeValue; TimeUnit.Minutes)} min"
)

每个TimeUnit.XXX都标记为错误,"TimeUnit.Hours不被识别",但在画布中正常工作。

PowerApps TimeUnit.XXX 自更新以来不再被识别?

英文:

Everything was working fine until the update of components 1-2 days ago. Without any change to my specific code block. TimeUnit.anything is no longer recognized. I can still use e.g. TimeUnit.Hours in the canvas app area, the problem only occures in the components tab.

Why does this error occur? TimeUnit.XXX is a built in function...

In my PowerApps app, I have a component with the "function" getTextFromTimeRounded, shown in this image:

PowerApps TimeUnit.XXX 自更新以来不再被识别?

My code:

If(
    IsBlankOrError(timeValue);
    "";
    DateDiff(Now(); timeValue; TimeUnit.Hours) >= 24;
    $"ca. {Round(DateDiff(Now(); timeValue; TimeUnit.Hours) / 24; 0)} Tag(en)";
    DateDiff(Now(); timeValue; TimeUnit.Minutes) >= 60; 
    $"ca. {Round(DateDiff(Now(); timeValue; TimeUnit.Minutes) / 60; 0)} h";
    $"{DateDiff(Now(); timeValue; TimeUnit.Minutes)} min"
)

Every TimeUnit.XXX is marked as an error, "TimeUnit.Hours is not recognized", but it works fine in the canvas.

PowerApps TimeUnit.XXX 自更新以来不再被识别?

答案1

得分: 0

如Carlosfigueira所提到的,这个问题已经解决了。

英文:

as carlosfigueira mentioned, this issue has been fixed

huangapple
  • 本文由 发表于 2023年6月16日 15:53:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/76488072.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定