cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

FioriElements - Grouping of table rows

mHambach
Explorer
0 Likes
1,802

Hi FioriElements - experts,
I'm a Fiori Elements newbe and work on my first App. The App displays all kind of information from SAP BP, SAP-FSCD (insurance) and DWH.
Data are coming from CDS-Views. The annotations are done in both, CDS and XML, depending on where it was easier to achieve…

Most things are fairly easy/straight forward and work fine.
However, i'm struggeling with a couple of issue. I found information in the community, but they did not work… šŸ˜ž So i decided to bring them up here, hoping to find some advice.
Thanks in advance for any response!
Best regards from Germany
Matthias

Here is the list of all issues. So please check my other posts as well šŸ™‚

ListReport - relatet:
1. Value-Help that does not load the data immediately
ObjectPage - relatet:
2. Dynamic SemanticObject (for SemanticNavigation)
3. Display Labels for a ColumnMicroChart
4. Grouping of table-entries
5. Two tables per section with CollectionFacet-annotationGroup
6. ToolTip for a FieldGroup - Table-Column
---------------------------------

4. Grouping of table-rows

The ObjectPage contains a table, that I want to group.

I tried both, CDS- and XML-annotation:

@ui.presentationVariant: { groupBy: [ 'type' ],
                                            sortOrder: [{ by: 'type', direction: #DESC }, { by: 'name', direction: #ASC } ] }           

<Annotations Target="cds_zcds_bp360_serv.bp_relsType">
…              
<Annotation Term="UI.PresentationVariant" Qualifier="REL_presentationVariant">
    <Record Type="UI.PresentationVariantType">
        <PropertyValue Property="GroupBy">
            <Collection>
                    <PropertyPath>Typ</PropertyPath>
            </Collection>
            </PropertyValue>
        <PropertyValue Property="Visualizations">
            <Collection>
                <AnnotationPath>@UI.LineItem#REL_lineItem</AnnotationPath>
            </Collection>
        </PropertyValue>
    </Record>
</Annotation>
</Annotations>

The CDS-Sorting works, grouping does not work neither way…. šŸ˜ž

Accepted Solutions (0)

Answers (2)

Answers (2)

Willem_Pardaens
Product and Topic Expert
Product and Topic Expert
0 Likes

Focusing on the CDS annotations:

- make sure to include a `visualizations` setting in your presentationvariant

- make sure to include the presentationvariant reference in the object page facet where it adds the table to the screen.

mHambach
Explorer
0 Likes

Hi Willem_Pardaens, thanks for your reply.

I included a visualization setting (a link to the lineItem, which is annotated in the same entity).

However, i don't know, how to add a reference to the presentationvariant in the table-facet.
Never seen coding for this... Could you give me an example...

Willem_Pardaens
Product and Topic Expert
Product and Topic Expert
0 Likes
here is an example where the Facet is making sure the table is rendered with the PresentationVariant activated: https://github.com/SAP-samples/btp-resource-consumption-monitor/blob/main/cf/app/btprcreport/annotat...
mHambach
Explorer
0 Likes

Hi Willem, thanks so much for the effort...

So I changed the Facet-Annotation from the LineItem to the PresentationVariant:
<PropertyValue Property="Target" AnnotationPath="to_RELS4BP/@UI.PresentationVariant#RELS_presentationVariant"/>.

Result ist, that the table is not displayd anymore... šŸ˜ž

I tried to annotate the LineItem and PresentationVariant in CDS and in XML.... Same thing...

junwu
SAP Champion
SAP Champion
0 Likes
mHambach
Explorer
0 Likes

Hi junwu, thanks for looking at it....

I know this page as well. Have been looking at all the corresponding pages...

The only thing I find is this one: "Grouping can only be activated for dimension columns."

What ist a "dimension column" ? Can't find any information about this.

Best regards, Matthias