Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Getting send indicator of delivery in a query


Level 2

Hello all,


I want to get the number of send in a primary delivery in a query. I have selected as target "Delivery" and in "Additional data", if I choose "dynamicIndicators/@dynamicSent", I get the following:

Label                                           DynamicSent

[2022/03/03] Name delivery        12

[2022/03/04] Name delivery        7


What I want, it is the following

Label                        Sent

Name Delivery          19


I have tried choosing in "additional data", the following "[masterKpis/@sumSent]", but I get the following error:

PGS-220000 PostgreSQL error: ERROR: INSERT has more target columns than expressions LINE 1: ...INSERT INTO wkf114074112_70_1 (iMasterKpisSumSent,iId) SELEC...
Can someone help me?
Thanks in advance
7 Replies


Level 6

The easy fix is to in you query select Primary = Yes.  That gives you an overall total for that delivery.  If you want a monthly total, you will need to change your recurring deliveries to aggregation period to a Month.  Your example indicates it is set to Day.  If you do the later then you can select only the current month totals by filtering the labels that have the current month and year.


Level 2

Thanks @johnwwilcoxmba 


I have tried including in the query, Primary= "Yes"


And in the output data I only get the proofs done:


Label                                           Send

[Proof 10] Name Delivery 1           4

[Proof 1] Name Delivery 2             1




Level 6

Under properties, is the resource and targeting dimension Deliveries (Delivery)?


Add @label in additional data.  Then run the query with the next step paused.  Click on the #record count, click open transition, then data.  You should see this: 




Level 2

The query is set up of the following way:








Additional data:



 And I get the following in "Open Transition":





I think our example is different from yours because in our case, we use recurring deliveries, so we have, two records for "Agra" delivery, one for each day, we need but we need to extract the "sent" of the master delivery. We would like a  field like the following one (sent Master= the summary of the send of each delivery created in each execution of master delivery, example 1.6k=33+1,57k):






Level 6

I don't see your primary = yes in the query logic.  I had that turned on which sums up in 1 delivery.  I do have recurring deliveries but they are removed and only shows the parent or primary delivery.  When you use Primary = Yes it will not show you single deliveries so I added a Label clause.






Hi @LAR1985,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know.