Unchecking keep result filed in a workflow through javascript

Avatar

Avatar
Validate 1
Level 2
mohammada451459
Level 2

Likes

9 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
mohammada451459
Level 2

Likes

9 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
mohammada451459
Level 2

14-03-2018

Hi ,

I am trying to create a workflow which will be requiring to uncheck the "keep interim result" check box. I can always go to the workflow and can do it because surely that is not the best practice.

But what I am trying to achive is to uncheck that box by changing the value of @keepresult  in xtk:workflow schema from YES to NO , how exaclt I can achive that through javascript ?

Thanks

Arif

Replies

Avatar

Avatar
Springboard
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct reply

231 solutions
Top badges earned
Springboard
Ignite 5
Ignite 3
Ignite 1
Validate 10
View profile

Avatar
Springboard
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct reply

231 solutions
Top badges earned
Springboard
Ignite 5
Ignite 3
Ignite 1
Validate 10
View profile
Amit_Kumar
MVP

14-03-2018

Hi Arif,

Write something like this.

var keepResultIn = 0;

var iWorkflowId = instance.id; // update this is to get all ids if you want to do a bulk, this code will work for current workflow

if(instance.keepResult) {

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

}

Regards,

Amit

Avatar

Avatar
Validate 1
Level 2
mohammada451459
Level 2

Likes

9 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
mohammada451459
Level 2

Likes

9 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
mohammada451459
Level 2

15-03-2018

Hi Amit,

Thanks! for the help, it's quite useful . You are a superhero .    : )

Avatar

Avatar
Level 1
drissd66472167
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
drissd66472167
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
drissd66472167
Level 1

26-07-2018

Hi Amit,

I replace

var keepResultIn = 0; by var keepResultIn = '';

And all objetcs of my workflow were disappear

How to correct the problem.

Thanks