cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SergiP
Advocate II
Advocate II

Anyone knows what is [@Filter] and disambiguate same name columns of a filtered result

each time I start typing Filter while coding in PowerApps, intellisense proposes as a first choice [@Filter].

does anyone know what is this for?

 

it would be amazing that this could disambiguate a filtered result like:

 

AddColumns(Filter(Collection, Field1="matched"), "NewColumn", lookup(table, table[@field2]= ???[field2], field3))

 

unfortunately [@Filter][@field2] doesn't do the trick...  so I have to renamecolumns one of these same named fields in order to avoid ambiguity and get what I want.

2 ACCEPTED SOLUTIONS

Accepted Solutions
mdevaney
Super User III
Super User III

@SergiP 

Here's an example of how to correctly apply the syntax.  I assume what you are trying to do here is join matching results from the datasource called table and show the value for Field3 in NewColumn.

AddColumns(
    Filter(Collection, Field1="matched") As your_other_table,
    "NewColumn", 
    Lookup(table, Field2 = your_other_table[@Field2], Field3)
)

 

If this idea does not work for you please share some sample data as well as how the desired result looks.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

WarrenBelz
Super User III
Super User III

@SergiP ,

I cannot test this presently, but you can use As for the disambiguation.

AddColumns(
   Filter(
      Collection,
      Field1="matched"
   ) As Matched, 
   "NewColumn", 
   LookUp(
      table,
      field2= Matched.field2,
      field3
   )
)

 

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.

 

View solution in original post

2 REPLIES 2
mdevaney
Super User III
Super User III

@SergiP 

Here's an example of how to correctly apply the syntax.  I assume what you are trying to do here is join matching results from the datasource called table and show the value for Field3 in NewColumn.

AddColumns(
    Filter(Collection, Field1="matched") As your_other_table,
    "NewColumn", 
    Lookup(table, Field2 = your_other_table[@Field2], Field3)
)

 

If this idea does not work for you please share some sample data as well as how the desired result looks.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

WarrenBelz
Super User III
Super User III

@SergiP ,

I cannot test this presently, but you can use As for the disambiguation.

AddColumns(
   Filter(
      Collection,
      Field1="matched"
   ) As Matched, 
   "NewColumn", 
   LookUp(
      table,
      field2= Matched.field2,
      field3
   )
)

 

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.

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (68,267)