I'm running into an issue where I cannot combine entities from Dynamics CRM within a Gallery.
Repro steps:
1. I am first aiming to show all Opportunities, and wish to use a delegatable function such as Search()to display Opportunities. Something like this works well and allows my text input “AccountSearchBox” to search on opportunity_name.
Search(Opportunities, AccountSearchBox.Text, "opportunity_name”,“sort_value")
2. Next, I would like to allow the text input “AccountSearchBox” to search account_name, not opportunity_name. Since Account and Opportunity have an N:1 relationship with account_id as the constraint, a simple lookup like so would give me its field:
LookUp(Accounts,accountid=ThisItem._parentaccountid,account_name)
Given that the third parameter of the Search() function must be a static column and cannot be calculated with a formula, my suspicion is I will need to:
- Modify the data model (either in Dynamics or PowerApps) to load the actual Account Name on the Opportunity entity, or:
- Identify a different function or workaround that will allow me to pass a lookup.
I would prefer to implement (b), but any advice or suggestions you have would be greatly appreciated!