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

powerapp gallary

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).

 

3 REPLIES 3
Super User
Super User

Re: powerapp gallary

Hi @rajesh_patil74

 

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.

 

https://powerusers.microsoft.com/t5/General-Discussion/Hide-Data-Card-when-value-is-blank/m-p/42349#...

 

 

Community Support Team
Community Support Team

Re: powerapp gallary

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

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
rajesh_patil74
Level: Powered On

Re: powerapp gallary

@v-monli-msft

 

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.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,289)