cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vik
Regular Visitor

How does the "[@[@" notation work?

I'm seeing this in the autocomplete, it looks like the Excel Table notation format but I don't see any documentation on how it applies here.

1 ACCEPTED SOLUTION

Accepted Solutions
rgruian
Power Apps
Power Apps

PowerApps provides the [@ident] syntax for two kinds of identifier disambiguation.

 

[@global_name]

This is used for global identifier disambiguation. When a global name (such as slider1) collides with another name (for example the name of a column in a table, within an aggregate formula), one can use the [@name] to refer specifically to the global name, whereas the unqualified name refers to the inner (column) name:

 

    Filter(MyTable, [@slider1].Value = slider1.Value)

 

In the example above, [@slider1] refers to the global slider1 control, whereas slider1 refers to the hypothetical column name 'slider1' within MyTable.

 

name[@field]

This is used for row scope disambiguation. In some cases formulas may include nested aggregates that operate on tables with colliding names. For example some column 'CustomerID' that exists in both Customers and Orders. According to the PowerApps Language's scoping rules, the innermost row scope obscures the outer row scope. When access to such colliding field names is desired within the innermost scope, one can use this disambiguation syntax to refer to either the inner or the outer fields explicitly, as necessary. For example:

 

    Filter(Orders, Amount < LookUp(Customers, CustomerID = Orders[@CustomerID], TypicalAmount))

 

In the formula above, CustomerID refers to the field in the innermost row scope (i.e. a field in Customers), whereas Orders[@CustomerID] refers to the corresponding CustomerID field in the outermost row scope (i.e. a field in Orders).

 

I hope this helps.

 

Radu Gruian [MSFT] ** PowerApps Staff

View solution in original post

2 REPLIES 2
rgruian
Power Apps
Power Apps

PowerApps provides the [@ident] syntax for two kinds of identifier disambiguation.

 

[@global_name]

This is used for global identifier disambiguation. When a global name (such as slider1) collides with another name (for example the name of a column in a table, within an aggregate formula), one can use the [@name] to refer specifically to the global name, whereas the unqualified name refers to the inner (column) name:

 

    Filter(MyTable, [@slider1].Value = slider1.Value)

 

In the example above, [@slider1] refers to the global slider1 control, whereas slider1 refers to the hypothetical column name 'slider1' within MyTable.

 

name[@field]

This is used for row scope disambiguation. In some cases formulas may include nested aggregates that operate on tables with colliding names. For example some column 'CustomerID' that exists in both Customers and Orders. According to the PowerApps Language's scoping rules, the innermost row scope obscures the outer row scope. When access to such colliding field names is desired within the innermost scope, one can use this disambiguation syntax to refer to either the inner or the outer fields explicitly, as necessary. For example:

 

    Filter(Orders, Amount < LookUp(Customers, CustomerID = Orders[@CustomerID], TypicalAmount))

 

In the formula above, CustomerID refers to the field in the innermost row scope (i.e. a field in Customers), whereas Orders[@CustomerID] refers to the corresponding CustomerID field in the outermost row scope (i.e. a field in Orders).

 

I hope this helps.

 

Radu Gruian [MSFT] ** PowerApps Staff

View solution in original post

Resolved my doubts also. Thanks!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,074)