"If" condition on group element?

Hi Support,

On the attached template I need to split the hour charges and fee charges into two different tables. This is based on the Category field:

So if the Category is Labor - Employee, the heading should be Hours and the details should be listed for that category. If the category is ProgressFee, the heading should be Fees and list those transactions.

How do I do that?

WLPPMIPPSAProjInvoice.PMIPProjectInvoicing (1).ddsp (298.3 KB)
PTIN0022772 new ddsp.docx (119.1 KB)

EDIT:
The transactions should be grouped by PMIPDescription for each of the categories.

Hi @Nicky!

You can achieve what you are going for by using two nested Groups (Group tagging elements), by this you would firstly group by Category to get groups by category and then use the group inside that one to group further more by PMIPDescription.

Once you’ve done this you need to use the List taggging element inside those two nested groups in order to display data that is filtered out by the two groups, which is why you need to use the List tagging element. Make sure that you are always using the Data-context when binding group, list and field tagging elements inside a context of each other.

I hope what I’ve written is clear. I am attaching the document I’ve edited for you. You can review the solution there as well.

PTIN0022772 new ddsp (Edited by Docentric).docx (118.4 KB)

Hi Blaz

I need the table to display like this:

I’m not able to get it to work in a nested group element, and currently the Fees section pulls in the category from the Hours.

PTIN0022772 new ddsp (Edited by Docentric) (1).docx (119.2 KB)

Hi @Nicky,

Apologies, I have misunderstood your request. In this case, you can ditch the List tagging element as you only want to group by @TransTableLabel and @PMIPDescription fields, and then as I understand only display summed values in Hours, Rate and Amount columns.

The result should look like this:

Note that I’ve made two approaches on how to add summed values in the Hours, Rate and Amount column. One is with the Summary tagging element, and the other is with the Field tagging element utilizing sum() function.

I am attaching the document I’ve edited, for your convenience.
Let me know if this is what you were going for.

PTIN0022772 new ddsp_Groups (Edited by Docentric).docx (118.4 KB)

Hi Blaž,

Yes this is what I was looking for, thank you. I almost had it. :slight_smile: