Hi,
I want to access adminSystem parameter in workflow using javaScript code. From value of adminsytem I want to split the templates.
Thank you in advance.
Best regards,
해결되었습니다! 솔루션으로 이동.
토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.
조회 수
답글
좋아요 수
Hi @RiyaMa
Could you please log the variables res and result to see the structure.
If I am understanding you structure correctly then, you can access adminSystems by :-
var a = res.data;
var b=a.adminSystems.
Regards
Akshay
조회 수
답글
좋아요 수
Hello @RiyaMa
I am assuming you are working with webApp.
The code to get adminSystem is
ctx.vars.adminSystem
조회 수
답글
좋아요 수
Thanks @_Manoj_Kumar_ I am very new to Adobe Campaign basically have workflow where In JavaScript code I have added below code
var schemaName = vars.targetSchema.substring(vars.targetSchema.indexOf(":") + 1);
logInfo(schemaName);
var collection = <{schemaName + '-collection'} xtkschema={vars.targetSchema}/>
//logInfo("Collection" +collection);
var query = xtk.queryDef.create(
<queryDef schema= {vars.targetSchema} operation="select" lineCount={vars.recCount}>
<select>
<node expr="[target/ctx]" alias="data" />
<node expr="@id" />
</select>
</queryDef>
)
var res = query.ExecuteQuery();
var result = res.toXMLString()I was thinking I will get ctx value from here and then will split templates on basis of ctx value.
Thanks,
Shubhada
조회 수
답글
좋아요 수
Hi @RiyaMa ,
Can you confirm if the ctx values comes from a query. If so, then you may not need javascript, you can direclty use a split activity to segregate the population based on the query data.
조회 수
답글
좋아요 수
Not from query, It is coming from api and right now i am triggering from postman.
조회 수
답글
좋아요 수
Hi @RiyaMa
Could you please log the variables res and result to see the structure.
If I am understanding you structure correctly then, you can access adminSystems by :-
var a = res.data;
var b=a.adminSystems.
Regards
Akshay
조회 수
답글
좋아요 수
Hi @RiyaMa,
Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!
조회 수
답글
좋아요 수
조회 수
Likes
답글
조회 수
Likes
답글
조회 수
Likes
답글