英文:
PowerApps TimeUnit.XXX no longer recognized since Update?
问题
以下是翻译好的部分:
一切都运行正常,直到1-2天前的组件更新。在没有对我的特定代码块进行任何更改的情况下,TimeUnit.anything不再被识别。我仍然可以在画布应用区域中使用TimeUnit.Hours等内容,问题只出现在组件选项卡中。
为什么会出现这个错误?TimeUnit.XXX是一个内置函数...
在我的PowerApps应用中,我有一个具有“function”getTextFromTimeRounded的组件,如下图所示:
我的代码:
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不被识别",但在画布中正常工作。
英文:
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:
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.
答案1
得分: 0
如Carlosfigueira所提到的,这个问题已经解决了。
英文:
as carlosfigueira mentioned, this issue has been fixed
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论