【问题标题】:Navigation button based on a PowerApps dropdown value基于 PowerApps 下拉值的导航按钮
【发布时间】:2022-09-30 14:17:56
【问题描述】:
我一直在尝试设置强制下拉菜单以进入下一个屏幕。
这是我使用的代码,但似乎没有通过:
If(
IsBlank(type_4.Selected.Value),
Notify(\"Fill all the fields to continue\", NotificationType.Error),
Navigate(End,ScreenTransition.Cover) )
此问题特定于下拉输入。如果它是一个文本字段,我所做的就是替换选定的值经过文本它工作正常。
到目前为止,下拉菜单是我唯一的问题。
编辑:下拉菜单的默认值为选择你的答案(下拉菜单的首选)。
标签:
powerbi
powerapps
powerapps-canvas
powerapps-formula
【解决方案1】:
如果您的下拉菜单的默认选项是“选择您的答案”,那么您可以使用类似于以下的表达式:
If(
type_4.Selected.Value = "Select your answer",
Notify("Fill all the fields to continue", NotificationType.Error),
Navigate(End,ScreenTransition.Cover) )
【讨论】:
-
-
-
您可以使用Or operator 或Or function 组合多个条件:If(type_4.Selected.Value = "Select your answer" Or type_3.Selected.Value = "Select your answer", Notify("Fill all fields to continue", NotificationType.Error), Navigate(End, ScreenTransition.Cover))
【解决方案2】:
该代码也适用于我。但是,我每页大约有 4 个下拉菜单。有没有办法概括代码,以便它自动适用于每页的所有下拉菜单?