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 Apps
Answered

Login button

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

How can I make it so my log in button will only go to the next screen if the first name and last name fields are filled out? Additionally, after it goes to the next screen how would I be able to display the first and last name name that was entered? For example, "Hello, (First name) (Last name).

SuperJoeTendo_0-1693938069353.png

 

Categories:
  • Verified answer
    SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @Anonymous 

     

    First of all on your Button1.OnSelect you want use this code:

    If(
     TextInput1.Text<>"" && TextInput2.Text<>"",
     Set(First_Name,TextInput1.Text);
     Set(Last_Name,TextInput2.Text);
     Navigate(Screen2,ScreenTransition.Fade)
    )

     

    Then you can use the Set() function variable everywhere you wantt.

     


    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • Verified answer
    Griffin_C Profile Picture
    125 on at

    For the button property called DisplayMode, put:

    If(Or(IsBlank(txinFirstName),IsBlank(txinLastName)),DisplayMode.Disabled,DisplayMode.Edit)

    Where "txinFirstName" is the name of your First Name text input control and "txinLastName" is the name of your Last Name text input control. This will make it so that the button appears greyed out and is not clickable until both text fields are filled out.

    In the OnSelect property of your button, add the following to any operations happening there, remember to use a semicolon before or after depending on where you put it in your existing operations:

    ClearCollect(colName,{FirstName:txinFirstName.Text, LastName:txinLastName.Text})

    Again, where "txinFirstName" and "txinLastName" are the names of the text input controls.

    Then on the screen where you're navigating to, add a text label with the text property:

    "Hello, " & colName.FirstName & " " & colName.LastName & "."

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 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard