cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

help with gallery and CDS

Hello, I need help with the following problem. I have an entity in CDS called "REVISION" (attached photo). I want to show in a gallery filtered by the column "MATRICULA", I want that only the "KO" appear and to which column it belongs. Any ideas?Imagen sin título.png

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @antonio_piernav ,  your data seems to be stored in some sort of pivottable.
I think the only way to get what you want is to unpivot the data first.
In my test I unpivotted such data in a collection and use that collection as a source of the gallery.
In my case I named the collection colUnPivot and the gallery items: SortByColumns(colUnPivot;"Name";Ascending;"Test";Ascending)

Hope my attached image shows what I mean and can help you.

paUnPivot.PNG

 

Kind regards,

Maurits

 

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @antonio_piernav ,

 

This can be achieved by following steps:

You can add all the columns in the template part of the gallery, and set the Visible property of the controls for inspeccion123456 columns to:

If(ThisItem.inspeccion1="ko",true,false)
If(ThisItem.inspeccion2="ko",true,false)
...
...

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.

Hi and thanks for the answer. But I can not know to which column the result "KO" belongs.

I want to see in the gallery that the "matricula" "ddd" has "ko" in the "Inspeccion5"

 

ddd          inspeccion5

                        ko

 

ccc           inspeccion1      inspeccion3

                         ko                      ko

 

 

Thanks

Hi @antonio_piernav ,  your data seems to be stored in some sort of pivottable.
I think the only way to get what you want is to unpivot the data first.
In my test I unpivotted such data in a collection and use that collection as a source of the gallery.
In my case I named the collection colUnPivot and the gallery items: SortByColumns(colUnPivot;"Name";Ascending;"Test";Ascending)

Hope my attached image shows what I mean and can help you.

paUnPivot.PNG

 

Kind regards,

Maurits

 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (73,818)