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 / 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 Moderator 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

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 93 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
Valantis Profile Picture

Valantis 49

Last 30 days Overall leaderboard