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 / Checking a Text Input ...
Power Apps
Unanswered

Checking a Text Input against a SharePoint List

(0) ShareShare
ReportReport
Posted on by 65

Hi, 

 

I am trying to set up an email blacklist in powerapps. I have a list of emails in SharePoint that I do not want submitting a form through my powerapp so when they enter their email in the email submission box I have set up and it matches an email on the SharePoint list, I want to send an error message to the screen. How can I put this check into the powerapp? Is there a way to check a text input in a powerapp against a SharePoint list?

 

Thanks in advance for the help! 

Categories:
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Yes, once the user enters his/her email, do a lookup to see if the email exists in your SP list. If it does, set a variable to false. You can then use that variable to hide it disable other things (like form submit button) as needed. You can also use that variable to make a label visible (which is hidden by default) and the text on that label can be the error message that you want to display to the user.

    If you like this reply, please give kudos. If this answers your question, please accept this as a solution. Thanks!

    Hardit (Haman)
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @jviernes ,

     

    First of all, what is the column type of your email column in this list? I assume that it is a text column, then please set below formula in the OnSelect property of your submit button to achieve this:

     

    If(IsBlank(Lookup(ListName,EmailColumnName=TextInput1.Text)),SubmitForm(Form1),Notify( "You cannot use this email address.", NotificationType.Error ))

     

    Regards,

    Mona

  • jviernes Profile Picture
    65 on at

    @v-monli-msft, 

     

    My SharePoint list is named "Email Blacklist" and the column is just a single text column in the list called "Blacklist". The text input is named "ParentEmailAddress". 

     

    It is not recognizing the column name "Blacklist" and is throwing an error for that part. 

     

    Any suggestion on how to appropriately name the column name in the formula?

     

    Thanks!

     

    I set up the formula as:

     

    If(IsBlank(Lookup('Email Blacklist',Blacklist=ParentEmailAddress.Text)),SubmitForm(DataPage),Notify( "You cannot use this email address.", NotificationType.Error ))

     

     

  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @jviernes ,

     

    This formula should work as expected. What issue did you run into?

     

    Regards,

    Mona

  • jviernes Profile Picture
    65 on at

    This solution worked! I just had a typo when entering the formula. 

  • faithr Profile Picture
    2 on at

    I'm trying to do something a little similar and am getting an error of invalid number of arguments. Below is my code.  Do you see what I am missing?
    If(IsMatch(LookUp('Garcia Assets',Asset_Tag=Scan.Text)),Navigate(EditScreen1),Navigate(DetailScreen1))

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard