Hi @vanivi1,
If I understood correctly you can follow the below steps.
- Define the Parameter in Web App Properties. - Select Local variable or Context variable (e.g., ctx.vars.jurisdiction) ( Check Mandatory)
- Access the Parameter in a Script Activity -
- Add a Script activity before the page or query activity in your web app workflow.
- Use JavaScript to retrieve the URL parameter and store it in the context variable. For example:
var jurisdiction = ctx.vars.jurisdiction;
logInfo("Jurisdiction value: " + jurisdiction);if the parameter is not automatically mapped, you can manually parse the URL parameter
var jurisdiction = getUrlParameter('jurisdiction'); // Custom function to extract URL parameter
ctx.vars.jurisdiction = jurisdiction; // Store in context variableNote: The getUrlParameter function is not built-in, so you may need to implement it or rely on Adobe Campaign’s parameter mapping.
Use the Context Variable in QueryDef:
In a Query activity, use the context variable in the queryDef to filter data based on the jurisdiction value. For example:
<queryDef schema="nms:recipient" operation="select">
<select>
<node expr="@email"/>
<node expr="@firstName"/>
</select>
<where>
<condition expr={"[recipient/@jurisdiction] = '" + ctx.vars.jurisdiction + "'"}/>
</where>
</queryDef>This query filters recipients where the jurisdiction field matches the value from the URL (e.g., SWUSL).
Start → Script (set ctx.vars.jurisdiction from URL) → Query (use ctx.vars.jurisdiction in queryDef) → Page (display results) → End.
https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/push-parameter-values-passed-in-a-url-of-a-webapp-to-a-workflow/td-p/617320
Thanks
Sushant Trimukhe