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 / OnChange Search a data...
Power Apps
Unanswered

OnChange Search a datasource and navigate if it finds a match

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

The title really says all, what I am trying to do is scan an EAN using the barcode feature which updates a text input and will then search a datasource on another page. If there is a match it will navigate to the "Product_Review" page, else, it will display a static label saying no product was found.

 

New to powerapps, don't be too harsh 😉

Categories:
I have the same question (0)
  • bdodu Profile Picture
    399 on at
    So what’s the question? Tell us how we can help you, where are you stuck?
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    The entire post is the one question, how do I achieve what I have e listed above?
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Could you please share a bit more about your scenario?

    Do you want to search a datasource based on the formula that you filled within the OnChange property of the TextInput control?

    Further, could you please show a bit more about your PowerApps app's configuration?

     

    If you want to search a datasource based on the formula that you filled within the OnChange property of the TextInput control, I afraid that it could achieve your needs. 

     

    I have made a test on my side and my PowerApps app's configuration as below:11.JPG

     

    I add two Label controls, a Barcode control, a TextInput control and a Button control within my Screen1.

     

    The Text Property of Label1 control set to following formula:

    "Search Text:"

     

    The Text property of Label2 control set to following formula:

    "No Product was found!"

    The Visible property of Label2 control set to following formula:

    NoRecord

    Note: The NoRecord is a variable which initialized within OnSelect property of Button control.

     

    The Default property of the TextInput1 control set to following formula:

    Barcode1.Text

    The OnSelect property of the Button1 control set to following formula:

    If(IsEmpty(Search(ProductLists,TextInput1.Text,"ProductName")),UpdateContext({NoRecord:true}),Navigate(Screen2,ScreenTransition.Fade,{SearchText:TextInput1.Text}))

    Note: The ProductLists represents the datasource (SharePoint list datasource on my side) in another page, "ProductName" represents a column in the datasource. 

     

    The Screen2 (Another page) within my PowerApps app as below:12.JPG

     Add a EditFrom (Form1) within the Screen2, set DataSource, DefaultMode and Item property for the EditForm control as below:

    Form1.DataSource=ProductLists
    
    Form1.DefaultMode=FormMode.Edit
    
    Form1.Item=First(Filter(ProductLists,ProductName=SearchText))

    Note: The SearchText variable is passed from Screen1.

     

    Please take a try with above solution that I provided, then check is it could solve your problem.

     

    Best regards,

    Kris

     

     

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard