Expand my Community achievements bar.

Adobe v6 setting instance variable to campaign code and internal name

Avatar

Level 2

Hello. I am currently in a workflow within a campaign.

I am using a JavaScript icon to try to create instance variables for the campaign code and the campaign label.

Using Instance.id will give me the primary key for the workflow table. I am trying to get the primary key for the Operation table as well as the label(Which is the campaign name not the specific workflow name) which has a one to one relationship with the workflow table.

I tried using Instance.operation.id and Instance.operation.label to access data from the operation table but all it displays is 0 or undefined.

So my question is if you have a table that has a one to one relationship with the workflow table in adobe campaign, how do you access the data from the other table in a JavaScript Icon?

Thank you!

1 Reply

Avatar

Community Advisor

Hi ,

Once you have the instance id using instance variable, you can use queryDef on operation schema to find label/id or anything you want from operation table.

Like  for Workflow and campaign table, do reverse for your case

<queryDef schema="xtk:workflow" operation="select">

      <select>

        <node expr="@label" label="Label"/>

        <node  expr="@id" label="Primary Key"/>         

      </select>

      <where>

        <condition expr={"[operation/@internalName]='"+campaignInternalName+"'"}/>

   

      </where>

    </queryDef>

Thanks,

Kapil