web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Search Function - Givi...
Power Apps
Unanswered

Search Function - Giving errors

(0) ShareShare
ReportReport
Posted on by 75
Dear All, 
 
My search function is not working properly. I have two tables in a Parent/Child relationship: Employee and Attendance. Employee is the Parent, and Attendance is the Child. I created an EmployeeID column in Attendance table and relate it to Employee table via LookUp. I can use the following Search function easily in Attendance (gallery): Search(Attendance,txtSearchInput.Text,AttendanceID). AttendanceID is the Primary name column in Attendance. However, the moment I tried Search(Attendance,txtSearchInput.Text,Attendance,EmployeeID), I started to receive error. My gallery references ThisItem.LastName, ThisItem.FirstName, and as such, I thought I could use EmployeeID.LastName, etc., only to give error. I do not have issues using Filter, but I wanted to use Search Instead to allow me to search based on a few entries with column. The attached is my screen, if things if I set Items property to Attendances. However, when I used the Search function as indicated earlier, it gave me errors. Could you help? Your attention to this request is greatly appreciated.
 
Sincerely,
Isaiah A.
Categories:
I have the same question (0)
  • Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    Can you post a screenshot of the error?

    I'm confused by Attendance being used twice in your Search, once as the collection and again as a column to search.  This could be causing an error.
     
    Search(Attendance,txtSearchInput.Text,Attendance,EmployeeID)
     
    This could be causing an error, perhaps you mean to use "AttendanceID" in the second part.
     
    Whatever columns you're searching need to be a text field and in the collection you are searching.  Is EmployeeID a lookup field that matches Attendance to Employee?  If so you should use a filter on that.
     
    Something along the lines of 

    Filter(Attendance, <employee lookup column name>.<employee id column name> = txtSearchInput.Text Or AttendanceID = txtSearchInput.Text)

    Hope that helps, post some more details or screenshots if you need more assistance.
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 427

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 336 Super User 2025 Season 2

Last 30 days Overall leaderboard