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 / Perform a search on a ...
Power Apps
Answered

Perform a search on a List

(0) ShareShare
ReportReport
Posted on by 514

I am creating a login screen - the user enters a name and when a button is pressed I am trying to make it so that it performs a lookup on a Sharepoint list and looks to see if the user exists.

 

If the user is found in the list then navigate to a screen.

If not found then save the record and show a message that they have now signed up & make visible a button to log in.

 

Any help appreciated

 

Thank you

 

 

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @sienna28,

     

    Could you please share a screenshot of your app's configuration?

    Do you want to create a login screen within your app?

     

    I have made a test on my side, please take a try with the following workaround:9.JPG

     

    3.JPG

     

    Within the first screen (Login Screen), set the OnVisible property of the screen to following formula:

    UpdateContext({isShowLogIn:false})

    Set the Visible property of the Log in button (Button 2 control, hidden "Log in" button) to following formula:

    isShowLogIn

    Set the OnSelect property of the Validate button (Button1 control) to following formula:

    If(
    !IsEmpty(Filter('20180705_case5',UserName=TextInput1.Text)),
    Navigate(Screen2,ScreenTransition.Fade),
    Patch('20180705_case5',Defaults('20180705_case5'),{Title:"New Sign Up User",UserName:TextInput1.Text});Notify("Congratulations, you have signed up!",NotificationType.Success);UpdateContext({isShowLogIn:true})
    )

    Note: The '20180705_case5' represents the SP list data source within my app, on your side, you should add your SP list as a data source within your app. 

     

    When the user is existed in my SP list, the GIF image of my app as below:Test1.gif

     

    When the user is not existed in my SP list, the GIF image of my app as below:Test1.gif

     

    More details about Patch function, Notify function in PowerApps, please check the following article:

    Patch function, Notify function

     

    Please also check if the following blog would help in your scenario:

    https://www.c-sharpcorner.com/article/developing-login-page-in-microsoft-powerapps/

     

    Best regards,

    Kris

     

     

     

  • sienna28 Profile Picture
    514 on at

    Thas very helpful.

    Thank you very much.

     

    One other issue is when coming to the login screen from another screen, I am finding the username and password boxes are not cleared. I tried using a set variable to "" on the onvisible property of the screen and setting the default of the text box to that variable name, but the boxes still retain their values.

     

     

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @sienna28,

     

    Do you want to reset the Text Input box control within your login screen when navigating back from another screen?

     

    I assume that there is a Back button (Button control) within your another screen, and you could click this button to navigate back to your login screen (Screen1).

     

    Please set the OnSelect property of the Back button (Button control) within your another screen to following formula:

     

    Navigate(Screen1,ScreenTransition.Fade);Reset(TextInput1);Reset(TextInput2)

    Note: The Screen1 represents the Login screen within your app, the TextInput1 represents the Username box and the TextInput2 represents the Password box within your login screen.

     

    In addition, you could also take a try with the following workaround:

    • Set the OnVisible property of the first screen within your app to following formula:
    Set(IsReset,false)
    • Set Reset property of the Username box (TextInput1 control) and Password box (TextInput2 control) within your login screen to following formula:
    IsReset
    • Set the OnSelect property of the Back button (Button control) within your another screen to following formula:
    Navigate(Screen1,ScreenTransition.Fade);Set(IsReset,true);Set(IsReset,false)

     

    Best regards,

    Kris

     

     

     

  • Verified answer
    sienna28 Profile Picture
    514 on at

    Kris

     

    Many thanks - I just got around to testing this.

     

    I used your first example and it worked well.

     

    Thanks again for your help

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
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard