cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Filter Sharepoint List Then Lookup

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper III
Helper III

Re: Filter Sharepoint List Then Lookup

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

View solution in original post

5 REPLIES 5
Highlighted
Super User
Super User

Re: Filter Sharepoint List Then Lookup

@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."

Highlighted
Helper III
Helper III

Re: Filter Sharepoint List Then Lookup

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
Highlighted
Super User
Super User

Re: Filter Sharepoint List Then Lookup

@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."

Highlighted
Helper III
Helper III

Re: Filter Sharepoint List Then Lookup

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

View solution in original post

Highlighted
Super User
Super User

Re: Filter Sharepoint List Then Lookup

@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." 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,516)