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 for Lo...
Power Apps
Unanswered

Search function for Lookup Column

(0) ShareShare
ReportReport
Posted on by 43

I have created 3 tables in Dataverse.

First table is "Location". (columns: IDLocation, Name)

Second table is "Fixed Assets" that has lookup column to the first table (Location Table). (columns: FixedAssetsNumber, Location)

Third table is "Opname" that has lookup column to the second table (Fixed Assets Table). (columns: IDOpname, Fixed Assets)

 

How can i use search function if i want to filter a gallery that use Opname Table as the datasource by value of TextInput1 that contains Location Name?

Categories:
I have the same question (0)
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @calvinck00 Try this,

    Filter(Opnames, 'Fixed Assets'.'Fixed Assets' in Filter('Fixed Assets', Location.Name=TextInput1.Text).'Fixed Assets')
  • calvinck00 Profile Picture
    43 on at

    Sorry @CNT  but it still not working 😞

    calvinck00_0-1635908251975.png

     Maybe can you use the Search and AddColumn Function? This multilevel lookup problem is very hard to be solved for me. I'm trying to use this code but it gives me an error "Multiple Level of Many to One Relationship Expansion Aren't Supported".

     

    SortByColumns(
    Search(
    AddColumns(
    Opname,
    "AssetNumber",
    'Fixed Assets'.'Fixed Assets Number',
    "AssetLocationName",
    'Fixed Assets'.Location.Name -> ERROR
    ),
    TextSearchBox3.Text,

    "AssetNumber",
    "AssetLocationName"
    ),
    "AssetNumber"
    )

     

     

  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @calvinck00 It is 'Fixed Assets' and not 'Fixed Assets Number'

    Filter(Opnames, 'Fixed Assets'.'Fixed Assets' in
    Filter('Fixed Assets', Location.Name=TextInput1.Text).'Fixed Assets'
    )

  • calvinck00 Profile Picture
    43 on at

    Hi, i have tried, but it still not working

    calvinck00_0-1635927907227.png

     

    I'm trying using addColumn and Search function like this:

    AddColumns(
    Opname,
    "AssetNumber",
    'Fixed Assets'.'Fixed Assets Number',
    "AssetLocationName",
    'Fixed Assets'.Location.Name -> ERROR
    )

    ERROR: "Multiple Level of Many to One Relationship Expansion Aren't Supported".

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @calvinck00 your formula will not work as "Multiple Level of Many to One Relationship Expansion Aren't Supported".

    What's the error you are getting? It looks like something is wrong with the Name column. 

  • calvinck00 Profile Picture
    43 on at

    Hi, i think its name problem. 

    Example in my case:

    Table NameColumn
    Fixed AssetsFixed Assets Number, Location (lookup)
    OpnameOpname ID, Fixed Assets (lookup)

     

     

    Name that i type in red color must be different? Because i feel like power apps do not know which "Fixed Assets" (is it the table or the lookup column).

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @calvinck00 You can refer the table as [@'Fixed Assets'] to be specific.

  • calvinck00 Profile Picture
    43 on at

    Ok thanks mate! You help me again..

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @calvinck00 Glad to help!

  • carlilelance Profile Picture
    351 on at

    "in" is non-delegable 😞

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