web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch currentuser from...
Power Apps
Answered

Patch currentuser from personalized login screen

(0) ShareShare
ReportReport
Posted on by 22

Hi Everyone,

 

Please help me if possible.

 

My App has a personalized Login Screen, connected to a Sharepoint List where I have columns such as (UserID, UserName, Password, Leve-ID) thes list name is (  Login-Pintura  ).  Currently I'm using this code in the Login Screen Button:

 

If(!IsBlank(LookUp('Login-Painting', Title='LoginInput-Text'.Text And Password='PasswordInput-Text'.Text).Title),Navigate(HomeScreenMenu,ScreenTransition.Fade),UpdateContext({ShowForgotMessage:true}))

 

In the same App, there is task control with several functions which I Patch information to another Sharepoint List named (BDPinturaProjeto), currently I'm using this code to Patch:

 

Patch(BDPinturaProjeto,ThisItem, {ScannedBDPintura:Right(ScannerResultEngine.Text,6), UserBDPintura: User().FullName, DateBDPintura: Now(), StatusPaintBDPintura:PaintStatusYes.Text});Reset(ScannerResultEngine);Reset('ScanToFind-Engine');Set(varsingleScan1, "");Set(varsingleScan2, "")

 

How could I patch CurrentUser using my personalized login screen?

 

Sequence.jpg
Login.jpg
Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @ELPARANAENSE84 :

    Could you tell me :

    • What's the meaning of "patch CurrentUser using my personalized login screen"?
    • Do you want to get the username of the logged-in user?
    • Do you want to update a certain field of a record in BDPinturaProjeto with the username of the logged-in user?

    If so,I suggest you consider retrieving the user name in the user list and saving it in a variable when the user successfully logs in. Later, if you want to call the user name of the user, you only need to call this variable.For example:


    If(

    !IsBlank(LookUp('Login-Painting', Title='LoginInput-Text'.Text And Password='PasswordInput-Text'.Text).Title),

    Set(TheUserName,LookUp('Login-Painting', Title='LoginInput-Text'.Text And Password='PasswordInput-Text'.Text).UserName);

    Navigate(HomeScreenMenu,ScreenTransition.Fade),UpdateContext({ShowForgotMessage:true})

    )

     

    If you need to use the username of the logged-in user later, just call the variable TheUserName directly.

    Best Regards,

    Bof

  • ELPARANAENSE84 Profile Picture
    22 on at

    It worked perfectly, thank you so much

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard