Expand my Community achievements bar.

SOLVED

HOW TO ADD JS CODE IF CONDITIONS IN ACC

Avatar

Level 4

I have 2 tables IN Adobe Campaign:
I have to add this condition in my JS CODE : pLEASE HELP

Table 1 : CONSUMER table(this table holds all customer personal info) and it has fields like
Field 1: communication channel,this field "Communication Channel" has 2 values--2,3
field2: Name


Table 2: EMEDIA table table(this table holds all customer email address) and it has fields like
Field 1: emdt code
field2: emda address
field3: Timestamp

these tables have 1: N Mapping
Consumer table(1)Media table(N)

EMDT CODE IN TABLE2 HAS 2 values-eml, mbleml

I Need to have OUTPUT IN XML FORMAT FOR WHICH ALREADY I HAVE CODE WRITTEN NOW I NEED TO ADD THIS CONdition in my code

 

if (communication channel=2)

EMDT CODE from EMedia table should display "eml"
I caanot HARD CODE IT--
1)I WANT CODE TO TAKE Value of EMDT CODE from EMedia table as "eml" when communication channel value=2

please help me here

 

if(communication channel=3)

2)I caNnot HARD CODE IT--I WANT CODE TO TAKE Value of EMDT CODE from EMedia table as "mbleml" when communication channel value=3

 

PLEASE ADD CONDITION HERE:

PLEASE HELP

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @Shrutii 

 

Here is a trick to get the JS query code for any query in Adobe Campaign.

 

  1. In an empty workflow, configure the query activity according to your requirements.
  2. Once that is done. Right-click on the blank canvas in the workflow and select  Edit XML Source.
  3. Search for word condition, and you will get the JS condition code for your query def.

    Manoj_Kumar__0-1683000937280.png

     





     Manoj
     Find me on LinkedIn

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hello @Shrutii 

 

Here is a trick to get the JS query code for any query in Adobe Campaign.

 

  1. In an empty workflow, configure the query activity according to your requirements.
  2. Once that is done. Right-click on the blank canvas in the workflow and select  Edit XML Source.
  3. Search for word condition, and you will get the JS condition code for your query def.

    Manoj_Kumar__0-1683000937280.png

     





     Manoj
     Find me on LinkedIn