cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Cannot connect Display/Edit form to a multitable

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!

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

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

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Super User II
Super User II

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

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (35,387)