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 / How to get data from a...
Power Apps
Unanswered

How to get data from a list based on button click in PowerApps

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I am new to PowerApps and looking to build an application which has multiple validations.

One of the requiremnts is that on Button1 click, take value from TextBox1 and TextBox2, and then query a SharePoint List1.

If there is a list item in List1 which has entry for both TextBox1 and TextBox2 (and TextBox1 = TextBox2 ), then return True or else return False.

Now, on True submit the form and on Flase, show error message.

 

 

Will appreciate any help in this regard. Thanks in advance.

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

    Hi @ashish1183,

     

    For TextBox1 and TextBox2, do you mean TextInput control? 

    Further, would you please explain a bit for "and TextBox1 = TextBox2 " here?

    If here they indicate to TextInput control, then we could take a try with the formula below:

    If(
     IsEmpty(
     Filter('Testing list',
     Title=TextInput1.Text,
     Title=TextInput2.Text)),
     "No record found",
     SubmitForm(EditForm1)
     )

    IsEmpty function checks whether the Filter would return a blank table, and if it is true (which means the filter gives a blank result), the if function would give Text Message"No rcord found", if there is record found under the SharePoint list, it will then submit the Editform.

    For TextInput1 an TextInput2, the text input would match the title column in the SharePoint testing list, and the multiple conditions in Filter function are in the And logic.

    Adding the function reference:

    Filter, Search, and LookUp functions in PowerApps

    IsBlank and IsEmpty functions in PowerApps

    If function in PowerApps

    Please post back if you need any further assistance.

    Regards

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard