How to pick up current DELIVERY id in a DELIVERY report workflow | Adobe Higher Education
Skip to main content
salvdangelo
Level 5
September 22, 2017

How to pick up current DELIVERY id in a DELIVERY report workflow

  • September 22, 2017
  • 2 respostas
  • 6837 Visualizações

Hi everyone,

I am using a delivery report and in particular a query activity with a custom schema (containing delivery iDs in particular).
In "where condition" I would filter the records for the current delivery (SCHEMA.deliveryId = <currentDeliveryId>)

Someone could tell me how to do this?
Maybe it's a simple issue.


Thanks for helping!

Note: I am not using cube

Vipul RaghavAmit_Kumar

Jean-Serge Biron

Adhiyan

@nkur

Adobe Campaign

Este tópico foi fechado para respostas.

2 Respostas

Amit_Kumar
Level 10
September 24, 2017

Hi, Salvator,

In Adobe campaign this is controlled via context in reports, and this is the recommended way.

Read this here: Using the context

query activities in reports let you filter automatically using context like above.

let me know if you are getting stuck at any point.

Regards,

Amit

salvdangelo
Level 5
September 25, 2017

Hi Amit,

"Filter automatically with the context" is already flagged but I still see ALL THE RECORDS unfiltered for delivery id.
The same outcome if I flag in addition "limit the selected records" (limit to 1000 --> ALL THE RECORDS, limit to first record --> NO RECORD AT ALL).

Any suggestion?

Thanks,
Salvatore

Amit_Kumar
Level 10
September 25, 2017

Hi, Salvatore,

Are you using "Descriptive analysis" report or Adhoc Reports?

Can you enable the debug for this report of yours and check if you have _contextFilter? If you have this in your example post the inner XML from _contextFilter here?

It should be like this:

<_contextFilter>

    <where>

      <condition expr="@id = $noescaping(@_selection)" enabledIf="$(@_context) = 'selection' and $(@_hasFilter) = false" />

      <condition expr="@id" enabledIf="$(@_context) = 'selection' and $(@_hasFilter) and $(@_locationName) != 'descriptiveAnalysis'" subQuery="$(whereCond)" setOperator="IN" />

    </where>

  </_contextFilter>

Regards,

Amit

Jean-Serge_Biro
Level 10
September 29, 2017

Hi Salvatore,

You wrote in previous posts that:

  1. the Filter by context checkbox in the Query activity has been checked
  2. you run the report either being on a delivery and selecting your report through the dashboard, or in the preview mode by selection Selection checkbox and selecting the delivery

So you should have in the ctx (debug mode) the useful elements indicated by Amit.

Please confirm that way.

BR
JS

salvdangelo
Level 5
September 29, 2017

Hi Jean-Serge,

In debug mode, if selection type = "single selection" I have:

<where>

  <condition expr="@id = $noescaping(@_selection)" enabledIf="$(@_context) = 'selection' and $(@_hasFilter) = false" />

  <condition expr="@id" enabledIf="$(@_context) = 'selection' and $(@_hasFilter) and $(@_locationName) != 'descriptiveAnalysis'" subQuery="$(whereCond)" setOperator="IN" />

</where>

that is equal to that one that wrote Amit above.

Salvatore

salvdangelo
Level 5
October 6, 2017

I meant by "source" the schema dimension selected in Property/Document Type.
I still don't understand your error and wonder about any misleading somewhere, so sorry in advance if I ask for too much checks.

So, in debug & preview mode, selecting Selection one, are you on delivertSegmentsOTB dimension, and does it list records from that schema/table and you select one? Or are you on nms:delivery  dimension, and you select a specific delivery?
In your  URL, it was: _selection=1341861

case of Document type is Delivery:
it should work with _selection value / filter by context exactly as you did. In that case I wonder why it gives error.
case of Document type is deliverySegmentsOTB, the filter checkbox must be on the Query activity of the same and not on the Delivery activity.

Well, see another way to proceed on same principle, report "throughput":

This report can be called on 2 selection context. See carefully the operation one, closed of your deliverySegmentsOTB: as you can see, the filter criteria is based on @_selection and of course in that case, the checkbox Filter with the context is not activated.

One more tip: force to a static variable the value of a delivery-id to see if you get good results and highlight some issue somewhere, if filtering by context is a headache for you.


Good luck and nice week-end.
Best Regards.
JS


I finally solved this issue thanks to your help and after many attempts!

Here is my custom solution for anyone that might need:

Workflow.

1st query:

2nd query:

It does work fine!