Hi,
I have lets say 2 groups and with manager A and B. Each manager will be given the app to edit there employees information (Example: email, office, Name, etc). The tables are excel tables from OneDrive. I want to make it so a table will change depending on who is logged on the app. So, I made a table to connect emails to tables.
Set(CurrentUser,User()); ClearCollect(TableCollection, Table({ManagerEmail:"ManagerAEmail@company.com",Table0:Table1}, {ManagerEmail:"ManagerB@company.com",Table0:Table2}))
I then set a gallery (Gallery1) to lookup the manager with
Lookup(TableCollection, ManagerEmail=CurrentUser.Email, Table0)
This all works perfectly, however, I cannot seem to connect this to a display/edit form. I tried this
DisplayForm1.DataSource=TableCollection DisplayForm1.Items=Gallery1.Selected
However, it gives me the error "Invalid formula. Expected a value compatible with 'DataSource'."
I tried collecting the table the gallery is using, but I can never make the edit form changes go through
Any help would be great! If I did not explain well enough I am more than happy to explain again.
Thank you so much!
Solved! Go to Solution.
Hi zdieter,
Copying the message I have sent to you here:
"
Collection is not supported with the form control.
You may take a look at the thread below for a workaround:
Working with collections in PowerApps
"
Let me know if you have any further questions.
Regards,
Michael
Hi ZD,
The display/edit forms have to be an exact match to the DataSource in the gallery. I believe you need to be more specfic in the items property. Please try Lookup(TableCollection,ID=Gallery1.Selected.ID) in the Items property of your Display and Edit forms. ID can be any unique field in your DataSource.
TableCollection Has two fields: manger email and table0 (Tables from excel).
The excel table field are Age and Name.
Example:
Age: 66 Name: Duck
Age: 50 Name: Jeff
I have the Datasource in my display form as TableCollection. I am having trouble understanding how to us this Lookup(TableCollection,ID=Gallery1.Selected.ID) in the Items field. I am trying something like this currently
Lookup(TableCollection,Table0 = Gallery1.Selected.Age)
But this gives me errors. Could you explain more on how to use this "lookup"?
I tried
LookUp(TableCollection, Gallery1.Selected.Name in Table0.Name)
and this has made the errors stop and I can add costume cards, but it says "not data is connected" on the display/edit form and will not save the changes to the excel file
It is good practice to have an ID column in every table that is a unique integer. That way you can reference that record from somewhere else. Try adding an ID column to your Datasource (TableCollection) and try using the Lookup formula again.
Hi zdieter,
Copying the message I have sent to you here:
"
Collection is not supported with the form control.
You may take a look at the thread below for a workaround:
Working with collections in PowerApps
"
Let me know if you have any further questions.
Regards,
Michael
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
213 | |
198 | |
83 | |
59 | |
38 |
User | Count |
---|---|
309 | |
255 | |
123 | |
86 | |
55 |