Hello,
I'm trying to write a filter and I'm struggling with what needs to be in it. I am looking to have the powerapp filter results of "forecast Form" based off of the "rep name" in another list called "global Accounts" and filter those results based off of the current user. I already had the app working where it would filter the "forecast form" by "Rep Name" in the same SP list but now I'm asked to reference the "global accounts" SP list since the rep name was removed from the forecast form.
Hi @Anonymous ,
You cannot filter on a Lookup field. Using your syntax try this
Filter( AddColumns( 'Forecast form', "aRegion", 'GWA ID L/U:Region_TXT' ), 'Global Accounts' = CurrentUser || aRegion = CurrentUser )
Please click Accept as solution 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 Thumbs Up.
Thank you, I forgot about not being able to use lookup columns from SP. I ended up having 2 columns added to the SP list "global accounts" one for account managers and one for sales managers so it can filter based off those 2 columns and the current user. below is what I changed from your reply but I'm getting a invalid argument error.
Filter(AddColumns('Forecast form', "aregion", 'accountmanger_txt'), 'Global Accounts' = CurrentUser || "aregion", 'salesmanager_TXT' = CurrentUser)
Your syntax is invalid in this bit
'Global Accounts' = CurrentUser || "aregion", 'salesmanager_TXT' = CurrentUser
If Global accounts = CurrentUser (OK), but after the Or() || statement, your have put the new column on it own without an equals argument, then salesmanager_TXT = CurrentUser (OK).
Do you need the new column now, if so it has it equal something.
I only need the new column if it's required for powerapps to filter properly. The data is pretty much the same in "global accounts" as it is in forecast with the exception of account rep and manager's names to filter by. I was adding the additional columns thinking that was the right way to go since it was in your previous solution. The adding of columns and filtering by another SP list are new to me as I learn powerapps.
@Anonymous
Yes but it I still had to equal something. Remove it and see if this gets you what you want.
So something like this?
@Anonymous ,
Apart from the capitalisation of display name, that is valid code, providing it references matching fields and controls.
@WarrenBelz
I capitalized the DisplayName but I'm not getting any accounts returned when I test it along with .displayname and = are showing as invalid arguments. Am I missing the column it should be referencing on the SP list "Global Wireline Accounts"? The forecast form is filtered in SP based off lookup columns that look up the users from global wireline accounts SP List and I'm trying to accomplish the same in the app. My data sources in powerapps are the 2 SP lists mentioned above and office365users.
I have been mainly looking at syntax to this point. I cannot see your data, so can you please summarise what field have to equal what values in what lists.
Sorry about that, sure thing.
I'm looking to filter "Forecast Form" data by the current user logged in and that could be a rep or the manager. The forecast form doesn't contain txt columns for the rep and manager, only lookup columns and those are looked up from the "global wireline accounts" list. I want the app to look at the "global wireline accounts" list and filter the columns "sales manager_TXT" and "Account Manager_TXT) against the current user so that the accounts in the Forecast form are only displayed for those reps and managers that own the accounts. In the end the rep/manager will select an account and the app will take them to the details page based off the forecast form. From there they will then select edit and it will open an edit page so they can input the necessary forecasts and that data once saved will populate back in the "forecast Form" list of SP. Hope this helps and make sense.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 836 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
MS.Ragavendar 231 Super User 2025 Season 2