how to make a workflow trigger on changing a value in particular field of record in table?

Shivani Khedek1
Giga Contributor

I want to create a workflow which should get triggered on change in particular field of record in my table.

I have a table named "Record" extending task table with each record containing a field "Owner" which referencing a user from user table.

These records get assigned to particular user using "assigned to" field to make change in "Owner " field.

I want my workflow to be triggered on change in "owner" field in my table "record".

Please suggest , I tried implementing if condition for this but I am not getting how to use it for change of owner field.

find_real_file.png

4 REPLIES 4

Jaydeep Parmar
Kilo Guru

Hi

You can set condition as Owner is not empty

 

Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.

Jaydeep Parmar

 

find_real_file.png

Hi, 

Actually I am already passing another user as a owner while inserting a record.

so this will not work I think.

 

 

Hi 

Please check if there is "changes" in the filter. The set the filter to Owner changes.

 

Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.

Regards,

Omkar Mone

www.dxsherpa.com

find_real_file.png

Tushar Sharma2
Kilo Guru

Hello Shivani,

We cannot use the 'changes' operator in workflow as it will impact the performance of instance.
If you need Workflow to be triggered on changes of any field then you can try with below approach which runs the workflow every time when the field value is changed. In that case you can trigger the workflow via script i.e a Business rule on your table ('Records') with your condition (owner changes). and write below script.

var gr = new GlideRecord('wf_workflow');

   gr.addQuery('name', 'YOURWORKFLOW NAME');

   gr.query();

   if (gr.next()) {

   var wf = new Workflow();

   var workflowId = '' + gr.sys_id;

   wf.startFlow(workflowId, current, current.operation);

   }

Mark Correct if it solved your issue.

Regards,

Tushar Sharma

www.dxsherpa.com

find_real_file.png