在PowerApps中实现登录表单

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

Implementing Login Form in PowerApps

问题

我已经在PowerApps中使用Canvas应用程序创建了一个简单的登录表单。

以下是登录按钮的代码:

If(
    !IsBlank(
        LookUp(AdminCredentialList, Title=username.Text And Password=passwrd.Text).Title,
        Navigate(Screen2),
        UpdateContext({ShowForgetMessage:true})
    )

在上述代码中,我遇到了一个错误:

PowerApps中出现意外字符。公式包含“eof”,其中期望的是“parenclose”。

英文:

I have created a simple login form in Powerapps using Canvas app.

Below shown is the code for Login Button

If(!IsBlank(
LookUp(AdminCredentialList, Title=username.Text And Password=passwrd.Text).Title,
Navigate(Screen2),
UpdateContext({ShowForgetMessage:true}))

In the above code I am getting an error

> powerapps unexpected characters. the formula contains 'eof' where 'parenclose' is expected

答案1

得分: 1

你的最外层函数(If)没有关闭。如果你看到这个错误消息,你的最后一个字符后面也会有一个微小的红色下划线。在代码的末尾再添加一个 ')',然后检查一下。

英文:

Your outermost function (If) is not closed. If you see this error message, there is also a tiny red underlining after your last character. Add another ')' at the end of your code and it should check out.

答案2

得分: 0

以下是翻译好的部分:

使用以下公式:

如果(
!IsBlank(LookUp(AdminCredentialList, Title = username.Text && Password = passwrd.Text).Title),
Navigate(Screen2),
UpdateContext({ShowForgetMessage: true})
)


**文档**: [Power Apps 中的 LookUp 函数](https://learn.microsoft.com/zh-cn/power-platform/power-fx/reference/function-filter-lookup)
英文:

Use below formula:

If(
	!IsBlank(LookUp(AdminCredentialList, Title = username.Text && Password = passwrd.Text).Title),
	Navigate(Screen2),
	UpdateContext({ShowForgetMessage: true})
)

Documentation: LookUp function in Power Apps

huangapple
  • 本文由 发表于 2023年5月17日 21:25:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76272623.html
匿名

发表评论

匿名网友

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

确定