cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Form won't show collection data

I can no longer connect view/edit forms to a collection data source for offline use. It works in the currently published version of the app, but if I try to edit the app the form wants me to connect to a data source, and the collections don't show as an option, onbly the online sources. Is this a change that has happened since I last published an update, or something wrong with my setup?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Jaffa,

 

I think form control should not be available to work with collections.

As the data source definition states:
"

Most PowerApps apps use external information stored in cloud services called Data Sources. A common example is a table in an Excel file stored in OneDrive for Business. Apps access these data sources by using Connections.

"

And a collection can't be treated as a valid data source.

 

While yes, if we create the App from the data source directly, then create a collection of the datasource, and replace the datasource with the collection in the datasource property of form control, then the form control becomes non-editable,  but would work for data operations.

 

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

9 REPLIES 9
Community Support
Community Support

Hi @Jaffa,

 

I think form control should not be available to work with collections.

As the data source definition states:
"

Most PowerApps apps use external information stored in cloud services called Data Sources. A common example is a table in an Excel file stored in OneDrive for Business. Apps access these data sources by using Connections.

"

And a collection can't be treated as a valid data source.

 

While yes, if we create the App from the data source directly, then create a collection of the datasource, and replace the datasource with the collection in the datasource property of form control, then the form control becomes non-editable,  but would work for data operations.

 

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

That means that it is no longer possible to have forms in an offline app. That would be unfortunate. My app Collects data from an online source and uses SaveData to save it locally when online, then uses LoadData to load it into a collection when offline, as my users often are. I'm sure others use the same structure. This means that it is no longer possible to display the detailed data in a form. It is still posible to lay it out manually, but why is that necessary, when the Display Form does exactly that?

 

I'm afraid I don't understand your last sentence. I cannot replace the live source with the collection - the collection does not appear in the list of sources, and replacing the DataSource property with the collection just results in the control saying it is not connected to any data.

Frequent Visitor

OK, I think I see what you mean now. Although it says it isn't connected to data it does still work when you play the app.

 

Hopefully this is a temporary situation and forms wil either be changed to work with collections or some other methodf of offline working will be developed. Thanks for your assistance.

Anonymous
Not applicable

I am seeing the exact same behavior in the current version of PowerApps web editor: on the Data tab of the Form, I am unable to select my collection as the data source, but on the Advanced tab I am able to type in the name of the collection into the DataSource field and then the app works as expected.

 

PowerApps dev team needs to fix this, it's misleading and caused me to waste a lot of time trying to figure out what was wrong when it was simply a web editor UI bug.

I'm able to connect to a collection using the Advanced tab, but I can't get the app or the data to flow into the form (edit or view). When I load the app nothing happens either. 

 

Has anyone got any suggestions? 

 

***Edit*** Never mind, just managed to get it working. No idea how/what changed but now its working....

Are you supposed to be able to load collections as a datasource for Forms?
I can't get it to work, in advanced I type the collection name but as Sulley I can't get it to work..


Would be great if we could patch values of forms into our collection of the current cell selected. Or if datatables could return what coulumn you have selected and not just the row.

Anonymous
Not applicable

If I type the name of the collection in the Advanced tab, nothing else works for me. Using SubmitForm only adds empty records to my collection even if I name the DataField after the correct column.

 

Seems like everything has to be hacked together in Power Apps, nothing works as desired.

Kudo Kingpin
Kudo Kingpin

Vote for this idea if you would like support for collections to be used as a fully functional datasource in display and edit forms!

https://powerusers.microsoft.com/t5/PowerApps-Ideas/Allow-Collections-to-be-used-as-a-DataSource-in-...

In your case, it just sounds like you need to manually type in the collection name into the items property.

In order to use a Collection as a DataSource for an EditForm, you have to:

1. Use a Gallery as a proxy. This is the only way I found to set the Form's `Item` property (gallery.Selected).

  1a. Without the Gallery, there isn't really an Item for the Form to display.

  1b. I spose you could do a Lookup based on a Button OnSelect or something to pull in one record from the Collection to display.

2. Add Custom DataCards (three little dots after clicking "Edit Fields" in the Form Advanced Properties)

3. Next, you need to set the Default values of Text/Label controls within the Custom Cards to be gallery.Selected.X, where "X" is the value in the collection you want to edit.

4. Add a button in one of the Custom Cards to Patch/UpdateIf the Collection with the edited values from the form

5. Lastly, Patch the edited Collection back to the DataSource

I wrote a little about it here if this helps: https://stackoverflow.com/questions/61840842/canvas-powerapp-form-unable-to-get-fields-from-custom-c...

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (6,841)