I am new to PowerApps and understood that Gallery is used to show list of records from collection. And for these collection one can choose from the predefined template (and template can be modifed with additional controls)
The individual controls can be made hidden or visible depending on items property value ( for eq. Status / Category).
(The collection of control is treated as data card - in case of Edit Form, per field there is datacard)
Would it be possible that, I can have different template ( data card) for Gallary depending on the items specific property.
For eq.
If Status is "completed", then i can use data card(template) which is template1.
If Status is "pending" then I can use data card(template) which is template2.
(Something like in WCF , we have can have different template for one list view component and depending on items type specific template get used for displaying data).
Yes, it's possible to display different data cards depending on the value of your 'status' field.
You can use an IF statement to conditionally show or hide cards, and the technique that you would use would be similar to the technique that's shown here.
Hi @rajesh_patil74,
You cannot have different template for the same gallery because Gallery use a template data card which is the first one to manage and work on the rest of it. But you can make this possible by setting the OnVisible property of the related controls. For example, you use the Image and Title Gallery layout , and set the OnVisible property of Image control inside the first data card to:
If(IsBlank(ThisItem.PictureLink),false,true)
Notice that this will only make the image control invisible but there still will be a blank space there. I personally think that this is meaningless because even though you don't set this visible property, if there is no value in Picture column, the image control will be blank too.
If you really need to have different layout for each data card, maybe you could post this idea in the PowerApps Ideas forum, so it might be considered for future releases.
https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas
Regards,
Mona
With individual controls in single template, I can hide or show depending on the field.
What I need to show is dynamic form (depending on "Type" column, different controls should be visible )
For eq. ( Label Single line TextBox) , (Label, Multiline TextBox), (Label, 3 - 4 CheckBox), (Label - 3-4 Radio Buttons ) etc.
Placing all these controls and enable/disable them, i think will have a performance overhead, so expecting it would be nice to use the datacard depending on some field.
So one gallay component but depending on item type different template (datapart) will be used. ??
-- Posting the idea is new idea forum.
Check out new user group experience and if you are a leader please create your group
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
255 | |
255 | |
81 | |
41 | |
30 |
User | Count |
---|---|
319 | |
263 | |
122 | |
64 | |
49 |