If I have created app with datasource of sharepoint List (suppose Employee list) then In the app i found two different instance of same employee datasource
One is with name Employee
and another with name [@Employee]
Both are pointed to the same datasource then,
What is the difference between these 2 instances?
Can you clarify how you got 2 datasources in the app for the same SharePoint list? When you import the SharePoint list, you should see one datasource with the list name, in the "Datasources" pane on the right.
I didn't get two datasource but suppose I have created Employee datascource then when I move over the formula section then I saw datasource instance with both Employee and [@Employee]. Both works same, both shows elements of same emloyee list
I think one may be where you changed something in the default configuration for that datasoure. (I could be wrong.) But when I do the (Trim) command, I then get an additional option, one field with the trim and one field without.
Would that explain things for you? Or did you not do anything to the default information display?
Both of them refer to the same thing, namely your one and only Employee data source.
"[@identifier]" is global disambiguation syntax supported by the PowerApps Language. Any global entity, such as a control, data source, collection, dynamic data source, etc -- can be referenced by its global disambiguated syntax. This is particularly useful in cases where the name collides with a different identifier, for example the name of a column is a Filter operation:
Filter(HealthRecords, Employee.Age < First([@Employee]).Age)
In the formula above, the first "Employee" refers to a column (field) of HealthRecords, whereas the second disambiguated [@Employee] refers to the global data source. If I used Employee in both cases that would have been a logical (and type) error.
Please note that Intellisense often suggests both forms of an identifier, specificallty to raise awareness about the need to disambiguate in certain scenarios (particularly in row scoping, e.g. Filter, Sort, GroupBy, etc).
Join us for the next call on August 17, 2022 at 8am PDT.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.