내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

How to add additional field in targetdata using script

Avatar

Level 4

Hello,

I am working on a requirement where i need to add an additional field 'field1' (not part of recipient or campaign). I need to  use field1 field in target mapping and store this in broadlog (created an custom field to store).

I need to create this field and set its value dynamically because different campaigns/workflow can have different values.

 

I can't do this query activity because the end-user won't be able to do this everytime they select a new query activity and enrich it.

 

What we can do is to set a delivery in initialization script tab of delivery template and then use it in delivery whenever user is configuring delivery using a delivery template.

 

I tried adding below code:

 

sqlExec("Alter table "+ vars.tableName + " ADD COLUMN icampaignFlag INT");

sqlExec("Update " + vars.tableName + " set icampaignFlag =" + 1);

 

But this field is not showing in target data. May be because there is no adobe name for this field.

How can we see this field in targetdata?

 

Can someone help?

 

@Deleted Account 

@AmitKumar 

 

 

 

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi,

 

Target schema can be altered with js but it's not for the faint of heart. Easier to prepopulate workflow template with query that has mapped field.

If the data doesn't vary by recipient, does it need to be in broadLog?

 

Thanks,

-Jon

원본 게시물의 솔루션 보기

4 답변 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi,

 

Target schema can be altered with js but it's not for the faint of heart. Easier to prepopulate workflow template with query that has mapped field.

If the data doesn't vary by recipient, does it need to be in broadLog?

 

Thanks,

-Jon

Avatar

Level 4

Hi @Jonathon_wodnicki ,

 

Could you please share the process of altering Target schema with js? I remember you mentioned two js functions (something like generateSchema) in a forum post here but unfortunately I could not find that post/comment anymore. I would love to explore them.

 

Thanks in advance,

Saikat

Avatar

Administrator
Hi @Jonathon_wodnicki, Could you please help @saikatk2447661 here? Thanks!


Sukrity Wadhwa

Avatar

Administrator
Hi @ckumari12, Were you able to resolve this query or do you still need more help here? Do let us know. Thanks!


Sukrity Wadhwa