cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Cannot connect Display/Edit form to a multitable

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
Highlighted
Super User III
Super User III

Re: Cannot connect Display/Edit form to a multitable

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. 

Helper I
Helper I

Re: Cannot connect Display/Edit form to a multitable

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"?

Highlighted
Helper I
Helper I

Re: Cannot connect Display/Edit form to a multitable

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

 

Highlighted
Super User III
Super User III

Re: Cannot connect Display/Edit form to a multitable

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. 

Highlighted
Community Support
Community Support

Re: Cannot connect Display/Edit form to a multitable

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,432)