Skip to main content

Notifications

Power Apps - Power Apps Pro Dev & ISV
Answered

Using Search function for searching in lookup columns

(0) ShareShare
ReportReport
Posted on by 82
 I have few lookup columns in my table , namely "PERMIT_TYPE" , "DEPARTMENT" and "PLANT". 
 
The formula i wrote is as follows , even before completing i get this error. I checked the syntax but couldn't find any solution. 
 
  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 144,609 on at
    Using Search function for searching in lookup columns
    Can you please remember to post your code in Text - saves re-typing here. The code should be something like
    Search(
       AddColumns(
          WORK_PERMIT_DETAILS,
          PermitType,
          PERMIT_TYPE.Value
       ),
       Textlnput2.Text,
       PermitType
    )
    Also as a bit of advice, SharePoint Lookup columns are mostly unnecessary with Power Apps and have the potential to cause you unwanted and unneeded complexity and restrictions - I have never used them. It is generally a better idea to get the required field items directly from the second list with Power Apps and write back to a Text column.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee
  • Suggested answer
    Pacel1 Profile Picture
    Pacel1 79 on at
    Using Search function for searching in lookup columns
    Searching the lookup column can be problematic.
    To work around this, you can create a collection that adds the text value from the lookup field to a new column
    ClearCollect(NameOfCollection,AddColumns(WORK_PERMIT_DETAILS,YourNewColumnName,PERMIT_TYPE.'PERMIT_TYPE'))


    Then searching the collection should work correctly
     
    Search(NameOfCollection, TextInput2.Text,YourNewColumnName)

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

End of Year Newsletter…

End of Year Community Newsletter…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #11 New Opportunities…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,609

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,420

Leaderboard