Hi,
I have an issue with the LookUp function.
I create a variable in the OnVisible property of a screen in the following way:
UpdateContext({SeminarData : AddColumns(EmployeeToLunchSeminar,
"SeminarName", LunchSeminar.Value,
"EmployeeEmail", Employee.Value,
"SeminarID", Value('LunchSeminar:ID'.Value))})
Then, in a gallery (same screen), I want to add additional columns to the variable in the following way:
AddColumns(SeminarData,
"Topic", LookUp(LunchSeminar, ID = SeminarID).Topic)
But PowerApps says that in the above code, 'LunchSeminar' is an invalid argument. But the 'LunchSeminar' data table exists. If I use the following code in the text property of a label inside the gallery, it works
LookUp(LunchSeminar, ID = ThisItem.SeminarID).Topic
Also, this setup worked fine for me in a different screen with a different data source. Why is 'LunchSeminar' is an invalid argument?
Also, if I use the following code in the OnVisible property of a screen:
UpdateContext(LunchSeminarVariable : LunchSeminar});And use the LunchSeminarVariable in the LookUp, it works perfectly. Why?

Report
All responses (
Answers (