cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
zdieter
Level: Powered On

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
Community Support Team
Community Support Team

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.
5 REPLIES 5
Super User
Super User

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. 

zdieter
Level: Powered On

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

zdieter
Level: Powered On

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

 

Super User
Super User

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. 

Community Support Team
Community Support Team

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.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Tomorrow, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 287 members 4,917 guests
Please welcome our newest community members: