In a Power Apps canvas app, the App.OnStart property contains the code above. The LookUp function returns blank for a user who exists in the Roles data source. What is the most likely cause?
LookUp matches the formula's column argument against the actual column logical name in the Roles data source. If that column is named differently from 'UserEmail', the lookup finds no matching record and returns blank even though the user exists.
Why this answer
The LookUp function in Power Apps relies on exact column name matching. If the Roles data source has a column named 'Email' or 'UserID' instead of 'UserEmail', the function will not find a match and will return blank, even if the user exists. This is a common schema mismatch issue in canvas apps.
Exam trap
The trap here is that candidates assume the LookUp function will automatically match any column containing the user's email, ignoring the exact column name requirement, or they confuse this with a data refresh or function availability issue.
How to eliminate wrong answers
Option A is wrong because the Roles data source is automatically loaded when the app starts; a manual refresh is not required unless the data source is explicitly configured to defer loading, which is not indicated. Option B is wrong because the Set function can store records, including the result of a LookUp, as long as the result is a valid data type (e.g., a record or blank). Option C is wrong because the User() function is fully available in Power Apps and returns the current user's email, name, and other details; it is a core function.