在我的 PowerApps 中,用户可以输入数据的电话字段和传真字段很少,现在它在 CDS 和电话数据类型中定义,但我不知道如何引导用户很好地输入它。我的经理希望我在用户与 App GUI 交互时为他们提供指导体验。那么如何显示带有 ( ) - 的电话输入框,以便用户填写其中的数字?
问问题
18 次
1 回答
0
There are probably many ways to accomplish this in PowerApps. The below is not the most elegant.
- Set textbox
OnChange
property to:
ClearCollect(colPhone,
Split(txtPhone.Text, "")
);
- Set textbox
Format
property toNumber
- Set textbox
MaxLength
property to 11 (depending on the format you desire) - Add a label below the textbox with:
Concatenate(
"+",
First(colPhone.Result).Result,
" (",
Concat(LastN(FirstN(colPhone.Result,4).Result,3),Result),
")-",
Concat(LastN(FirstN(colPhone.Result,7).Result,3),Result),
"-",
Concat(LastN(colPhone.Result,4),Result)
)
- Set label
Visible
property to!IsBlank(txtPhone.Text)
Again, pretty hacky, but you could use it with some minor tweaks.
于 2020-11-25T17:49:58.867 回答