Skip to main content

Notifications

Community site session details

Community site session details

Session Id : /Pg0OETCO9ZJnRfAqsE2l6
Power Apps - Building Power Apps
Unanswered

A few questions regarding Lookup fields in PowerApps Canvas app

Like (0) ShareShare
ReportReport
Posted on 12 Feb 2024 12:10:29 by

Hello!

I am building a canvas app using PowerApps. I have a lookup field column in my table referencing the product table. The table is of type Virtual in Dynamics, and there are especially two fields I am interested in, which are No. (dyn365bc_number) and DisplayName (dyn365bc_displayname). Regarding this lookup field, I have a couple questions:

 

Right now it looks like a dropdown box, which is good enough, however, it seems like the SearchFields are case-sensitive, which makes searching for a product very difficult. Is it possible to remove the case-sensitivity when searching in these lookup fields?

As a temporary solution, I changed the SearchFields to the product-number. Is it possible to search for two fields?

It seems like this variation: ["dyn365bc_number", "dyn365bc_displayname"] is not allowed in SearchFields, as I get this error:

 

hagru_0-1707738847457.png

 

I tried inserting the same bracket for DisplayFields as well to show both the name and number of the product, but that seems to only show the first column I insert, in this case, the product-number. Is there any way to display both fields?

 

  • Hagru Profile Picture
    on 14 Feb 2024 at 10:00:05
    Re: A few questions regarding Lookup fields in PowerApps Canvas app

    I don't think I quite understand how to implement that in my app..

    The product table is its own table in Dynamics. It is filled with products and columns from Business Central.

    I have another table for one of my forms, where I have a Lookup field, where the related table is that product table.

    This is then the field I add to my form in PowerApps. Using ["dyn365bc_number"] or ["dyn365bc_displayname"] alone in the SearchFields property of the field works well, except for the fact that the displayname search is case sensitive, and searching for "bread" will not find the product "Bread". Either way, preferably I would like to be able to search for both of them, so I assumed I could combine them into ["dyn365bc_number", "dyn365bc_displayname"], and it looks okay until I actually try searching in the field, then it gives me the error in the screenshot above.

     

    I understand the suggestion, but I suppose that is something I would put in the Items property, and I am not quite sure what to swap your generic names with.

  • Micky Profile Picture
    355 Super User 2025 Season 1 on 12 Feb 2024 at 14:37:58
    Re: A few questions regarding Lookup fields in PowerApps Canvas app

    Use Filter(dataSource,condition) to have multiple seach field using Or(boolean1,boolean2), and use Lower(textValue) to convert both values to a lowercase text value.


    See example below.

    Filter(dataSource,
     Or(
     Lower(dataSourceField1 ) = Lower(lookupvalue),
     Lower(dataSourceField2 ) = Lower(lookupvalue2)
     )
    )

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,786 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard
Loading started