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:
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?
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.
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)
)
)
WarrenBelz
146,786
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,093
Most Valuable Professional