cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JamesM
Level 8

DataCard? Feel like I'm going crazy.

I have loaded up some sample apps and they use 'Data Cards' to fix different layouts with 'sections' of the screen. I like this approach as you can group controls, but in my own app I can't find the option  anywhere to 'add' a data card. What am I missing? 

13 REPLIES 13
leyburn19
Level 10

Re: DataCard? Feel like I'm going crazy.

DatCards are a part of Forms.  When you add a form it will add datacards based on teh selected data source for teh form.  You can remove, hide and add as you like

JamesM
Level 8

Re: DataCard? Feel like I'm going crazy.

Thanks @leyburn19 - does that mean if I have no compatible data source to use with a view or edit form, I am unable to use DataCards as a means to control the layout of my screen / help define different areas of the screen to group controls under? That's a shame.

leyburn19
Level 10

Re: DataCard? Feel like I'm going crazy.

Not sure what you mean about compatable datasource.  Datacards are designed to be bound to any source or a collection. 

 

Are you wanting to create a number of unbound fields and then patch them to a source or something like that?

JamesM
Level 8

Re: DataCard? Feel like I'm going crazy.

My understanding of Forms, (View / Edit) is that they can only work with specific table resources (SQL Server, Sharepoint list, Excel file). None of my data sources are like this. They are generally Collections or Table variables from custom connector(s).  You're saying that Data Cards only become available when you add a Form to the screen, however as I have no compatible data sources to suit a form, I'm guessing I can't use Data Cards? Hope that makes sense.

leyburn19
Level 10

Re: DataCard? Feel like I'm going crazy.

Okay, I understand what you are looking at. What we probably need to know is what you are actually trying to achieve? It would seem to me that you want to base a number of fields on a collection and then update the collection or similar after that is this correct,
Super User
Super User

Re: DataCard? Feel like I'm going crazy.

Hi @JamesM

Forms can work with collections. In the Advanced section of the property window, set the Items property to the name of your collection (rather than use the data source dropdown). You can find the option to add a card through the Fields > Add a custom card menu item.
FormsCollection.JPG
As @leyburn19 says, if you let us know what you want to achieve, I'm sure someone here can give you some good advice on laying out screen sections.

Super User
Super User

Re: DataCard? Feel like I'm going crazy.

You can do as stated above where you tie to a collection instead of a typical data source or you can also put in a scrollable screen which will allow you to put stuff in the Canvas instead of Cards which works pretty much the same from a design stand point.

 

Community Support Team
Community Support Team

Re: DataCard? Feel like I'm going crazy.

Hi @JamesM,

Could you please share a bit more about your issue?

Do you want to add a Collection or Variable as a data source within a Edit form?

In default, when you connect a Edit form to a Table data source (e.g. SQL Server, SharePoint list, Excel table, etc), the Predefined cards would be shown up within right-hand panel. Please check the following article for more details:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-cards

If you connect your Edit form to a Collection or a Variable directly, the Predefined cards would not be shown up. But you could consider take a try to add a custom Data card within your Edit form, then add corresponding controls within the custom Data Card to display the data.

More details about adding a custom Data card within a Edit form, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-cards#customize-a-card13.JPG

Set the Item property of the Edit form control to a specific record within your Collection. e.g. Set the Item property of the Edit form control to following:

First(YourCollection)

Note: The EDIT form could only be used to display one record.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JamesM
Level 8

Re: DataCard? Feel like I'm going crazy.

Hi @v-xida-msft@rebeccas@timl@leyburn19

So I've finally gotten around to testing this, and still can't get it to work. 

 

In the OnVisible of the screen I have the following

 

ClearCollect(testCollection,InSiteConnector.GetAllStoresCurrentSales())

I have added an Edit Form and a Data Table (the table is to demonstrate that i do get data for my collection). 

 

The data table Items is set to: 

testCollection

The DataSource for the edit form is set to:

First(testCollection)

I then have two custom data cards. An example of one of the cards, it is set to 

Text(First(testCollection).daily_sales)

I can see that the field itself shows the data in designer (See bottom of screenshot)

2018-11-19 12_01_56-Heart In Hand - Saved (Unpublished) - PowerApps.png

 

However, when run - the form is empty? (The data table however is OK)

 

2018-11-19 12_02_18-Heart In Hand - Saved (Unpublished) - PowerApps.png

 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,897)