Hi there,
Is it possible to retrieve parameters from the URL and check whether a response has already been submitted in the custom schema I created? I want to perform this check when a user clicks on the WebApp Survey link in the email.
I’ve defined variables and set them as parameters under the WebApp’s properties:
ctx.vars.feature_cd1, ctx.vars.feature_cd2, ctx.vars.feature_cd3, ctx.vars.feature_cd4.
Can I add a JavaScript activity right before the page activity to check if a response has already been submitted for feature_cd=1, which corresponds to the feature_name1 column in the schema? If a response or value exists for that feature and the email ID, the user should see a "Thank you, you have already submitted the response" message.
Similarly, if the URL contains two features (e.g., feature_cd=1&feature_cd2=2), the page should display two questions. However, if the user has already answered one but not the other, I’d like to hide the answered question and display only the unanswered one.
Could someone assist with setting this up?
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Yes, this is doable, use test activity and check each response. As per response you can show next question.
Hi @ashish1212 ,
Thank you for your response.
I currently have both questions on the same page activity, allowing users to respond. However, is it possible to achieve this using a JavaScript activity before the page activity? For example, I want to check if the email address and featurename1 exist in the schema. If the value is found, the question should not be displayed, and instead, a message should appear: "Thank you. You have already submitted your response." I'm unsure how to retrieve the data based on the email address for this check.
Views
Replies
Total Likes
Hi @rvnth , in my view, you don’t have to use js to check if responded or not. Instead, use conditional statement inside your page activity.
1. Get the URL query Param using javascript on page load and store in ctx variables.
2. Use querydef javascript inside jsp tag (<% querdef function and do the operation%>)
3. Use if else conditions inside jsp tags to show hide your questions
Reference- for loop in web app: https://blog..com/2018/07/use-the-context-in-web-apps-in-adobe-campaign
Views
Replies
Total Likes
Views
Likes
Replies