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 / Filter Sharepoint List...
Power Apps
Answered

Filter Sharepoint List Then Lookup

(0) ShareShare
ReportReport
Posted on by 99

Hi,

Im having trouble on making a label visible. I have a label which gives a notification to the user that an Invoice Number already exists in a sharepoint column. I need to make this visible if there is a match as the user inputs the invoice number to a form. 

 

The formula also needs to filter the supplier so the Lookup is only relevant to the supplier. 

 

My code is 

LookUp(Filter('Supplier Invoices',Title=Gallery2.Selected),'Invoice Number',DataCardValue208.Text)

 

Thanks guys!

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Barber_Chris 

    Put this code in the Visible property of the warning message.

     

    IsBlank(
     LookUp(
     Filter('Supplier Invoices',Title=Gallery2.Selected.Title),
     'Invoice Number' = Value(DataCardValue208.Text)
     )
    )

     

     

    I am making a few assumptions:

    • The Title property in the Supplier Invoices table stores the name
    • Invoice Number is a number type in SharePoint
    • DataCardValue208 holds the invoice number

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Barber_Chris Profile Picture
    99 on at

    Hi,

    Thanks for your response. 

     

    Capture.JPG

     

    I get the following message with your formula. 

     

    • The Title property in the Supplier Invoices table stores the name - CORRECT
    • Invoice Number is a number type in SharePoint - THIS IS A TEXT COLUMN
    • DataCardValue208 holds the invoice number - CORRECT
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Barber_Chris 

    Here's my revised code since TextInput208 is a text column in SP

    IsBlank(
     LookUp(
     Filter('Supplier Invoices',Title=Gallery2.Selected.Title),
     'Invoice Number' = DataCardValue208.Text
     )
    )

     

    Please share a screenshot of the code in the formula bar + the error message if it does not work.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Verified answer
    Barber_Chris Profile Picture
    99 on at

    Hi,

    Thats works a treat thanks!

     

    Could that be manipulated so the user input tries to match the part of the string?

     

    For instance if an invoice number in sharepoint was W1378990 and the user entered 1378990 and vice versa it would show.

     

    Regards,

    Chris

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Barber_Chris 

    You could use the IN operator instead of equals. 

     

    IsBlank(
     LookUp(
     Filter('Supplier Invoices',Title=Gallery2.Selected.Title),
     'Invoice Number' in DataCardValue208.Text
     )
    )

     

     

    However, I would not recommend doing that because it can introduce problems in your app:

    • IN operator cannot be delegated so only the first 2,000 rows will be searched
    • While the user is typing your warning will show false positives

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

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