Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

keep the results of interim population between two executions

Avatar

Avatar
Validate 10
Level 3
Partha18
Level 3

Likes

19 likes

Total Posts

29 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
Partha18
Level 3

Likes

19 likes

Total Posts

29 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
Partha18
Level 3

23-09-2019

Hi Team,

I want to uncheck all the "keep the results of interim population between two executions" in all workflows. So i planned to create a workflow to update @keepResult to "No".

In Data schema > xtk:workflow > structure > Display advanced field, I can see @keepResult (keep interim result) attribute.

1836409_pastedImage_2.png

But when i open Query activity or Update Data activity and select xtk:workflow as filtering dimension, in Display advanced field i am unable to find @keepResult attribute.

1836408_pastedImage_1.png

I found this link in forums Unchecking keep result filed in a workflow through javascript  where we can update @keepResult to "No".

But please help me to solve this issue using Query and update data activity.

Thanks and Regards,

Partha Sarathy.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 3
Partha18
Level 3

Likes

19 likes

Total Posts

29 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
Partha18
Level 3

Likes

19 likes

Total Posts

29 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
Partha18
Level 3

03-10-2019

yeah thank you. I done this successfully using below code,

Start > Query > JavaScript code activity > End

1) Query: (query internal name: allWorkflowQuery)

This retrieve all workflows. (xtk:workflow -> primary key is not empty)

2) JavaScript code activity:

/*********************************************************************************************************/

var query = xtk.queryDef.create(

<queryDef schema="temp:allWorkflowQuery" operation="select">

     <select>

          <node expr="@id"/>

     </select>

</queryDef>

);

var record = query.ExecuteQuery();

for each (var variable in record) {

var primaryKey = variable.@id;

var keepInterimResult = 0;

xtk.session.Write(<workflow xtkschema="xtk:workflow" _operation="update" id={primaryKey} keepResult={keepInterimResult} />); 

/*********************************************************************************************************/

Regards,

ParthaSarathy

Answers (4)

Answers (4)

Avatar

Avatar
Validate 1
Level 4
somasundaramhal
Level 4

Likes

73 likes

Total Posts

71 posts

Correct Reply

12 solutions
Top badges earned
Validate 1
Shape 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 4
somasundaramhal
Level 4

Likes

73 likes

Total Posts

71 posts

Correct Reply

12 solutions
Top badges earned
Validate 1
Shape 1
Boost 50
Boost 5
Boost 3
View profile
somasundaramhal
Level 4

03-10-2019

Try this:

var query = xtk.queryDef.create(

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

  <select>

    <node expr="@keepResult"/>

    <node expr="@id"/>

    <node expr="@label"/>

  </select>

  <where>

    <condition expr="@id!=''"/>

  </where>

</queryDef>

);

var record = query.ExecuteQuery();

for each (var variable in record) {

xtk.session.Write(<workflow xtkschema="xtk:workflow" _operation="update" id={variable.@id} keepResult='0' _key="@id"/>);

}

keepResult='0'  means 'No'

keepResult='1' means 'Yes'

Avatar

Avatar
Validate 1
MVP
kapilKochar
MVP

Likes

128 likes

Total Posts

140 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Contributor
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
MVP
kapilKochar
MVP

Likes

128 likes

Total Posts

140 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Contributor
Give Back 10
Give Back 5
Give Back 3
View profile
kapilKochar
MVP

23-09-2019

Hi Partha,

Reason it's not visible directly in query activity because for this attribute xml="true" . Any specific requirement why you wanted to use this by query activity only? As you shared solution is defined by using JavaScript activity.

Avatar

Avatar
Applaud 5
Level 1
zstein15
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Applaud 5
View profile

Avatar
Applaud 5
Level 1
zstein15
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Applaud 5
View profile
zstein15
Level 1

01-12-2020

@Partha18 ,

 

Not sure if you ever got this figured out, but we're looking for a solution currently.

 

Based on the available documentation:

  "xml (boolen): if this option is activated, the values of the field don't have a linked SQL field. Adobe Campaign creates a Text type "mData" field for record storage. This means there is no filtering or sorting on these fields."

 

If you look in the Workflow schema and search "keepResult", it's set as xml="true". As it's highly recommended that you don't adjust anything in the out of the box schemas, the only other option could possibly be to create an extension which removes that piece, but without testing I'm not sure how exactly that works.

 

Avatar

Avatar
Validate 10
Level 3
Partha18
Level 3

Likes

19 likes

Total Posts

29 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
Partha18
Level 3

Likes

19 likes

Total Posts

29 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
Partha18
Level 3

24-09-2019

kapscool

Hi,

Thanks for responding! This JS works for updating only current workflow where i run the JS. But i want to update for all the workflows in our instance. (i.e) keepResult=No.

I tried below code. But it doesnt work.

var query = xtk.queryDef.create(

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

  <select>

    <node expr="@keepResult"/>

    <node expr="@id"/>

  </select>

</queryDef>

);

var record = query.ExecuteQuery();

for each (var variable in record) {

var keepResultIn = 0;

xtk.session.Write(<workflow xtkschema="xtk:workflow" _operation="update" id={variable.id} keepResult={keepResultIn} _key="@id"/>); 

please help me to acheive this function!

Thanks and Regards,

Partha