cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Power Apps
Power Apps

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

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
Highlighted
Power Apps
Power Apps

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

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

Highlighted
Helper I
Helper I

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

Resolved my doubts also. Thanks!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,881)