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 / Powerapps Gallry Searc...
Power Apps
Unanswered

Powerapps Gallry Search using multible tables

(0) ShareShare
ReportReport
Posted on by 64

Hi,

      I am having a problem with the search on gallery, I have 3 tables and I need to search by text values not ID's.

The gallery code is as follows. This is looking at the Notes field, I need to search by either employee name or vanreg.

These values are in 2 other tables, tblEmployee and tblVandetails. These tables hold the unique ID which is stored in the main table tblVanjourneyLog.

SortByColumns(Search([@'[dbo].[tblVanJourneyLog]'], TextSearchBox1.Text, "Notes"), "Notes", If(SortDescending1, Descending, Ascending))

Each field on form has a lookup field as below.

LookUp('[dbo].[Employee]',employee_id = ThisItem.EmployeeID,Concatenate(employee_fname," ",employee_sname))

I need search routine to search by either employee name or vanreg as text not ID's.

 

Thanks in advance for any help on this.

Andy

 

Categories:
I have the same question (0)
  • v-yutliu-msft Profile Picture
    on at

    Hi @AndyRossco ,

    Do you want to filter tblVanJourneyLog based on either employee name or vanreg?

    Does tblEmployee have fields:employee_fname,employee_sname,employee_id

             tblVandetails have fields:vanreg,employee_id

             tblVanJourneyLog have field:EmployeeID?

    If so, try this formula:

    Filter(@'[dbo].[tblVanJourneyLog]',
     EmployeeID in Search(
     AddColumns(
     '[dbo].[tblEmployee]',"Name",Concatenate(
     employee_fname," ",employee_sname
     )
     ),
     TextSearchBox1.Text,"Name"
     ).employee_id
     ||
     EmployeeID in Search(
     '[dbo].[tblVandetails],TextSearchBox1.Text,"vanreg"
     ).employee_id
     )

     

     

     

    Best regards,

  • AndyRossco Profile Picture
    64 on at

    Hello v-yutliu-msft, Thank you so much for your reply.

     

    See below table relationships, As you can see the tblVanjourneyLog is main table pulling employee details and van details from related tables.

    I need to search or filter gallery by either employee ",Concatenate( employee_fname," ",employee_sname ) or Reg.

     

    Basically when user types in text into search text box it looks for similar text in these fields. So user can type Mike and it finds Mike Morgen etc, Or

    He types WA18 and finds anything associated with this reg number.

    Alternatively if this is too much , need search box to search by either employee or van reg. using separate search boxes.

     

  • AndyRossco Profile Picture
    64 on at

    Here is view of app.

  • AndyRossco Profile Picture
    64 on at

    Here is view of SQL links

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
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard