Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Run rule only once

SOLVED
Go to solution
Highlighted
Pedro_X
Occasional Contributor

Run rule only once

Dear,

 

Please I need help with a ruler, I have a rule that runs whenever the field changes, the rule need only be run once.

 

regards

3 REPLIES
Jim Esler
Honored Contributor

Re: Run rule only once

Set up a hidden field on the request called something like Rule has run? with a Yes/No dropdown. Set the default value to No. Add a condition to your rule for this new field to have a value of No. Add this new field to the results list and add values to the SQL to set the hidden and visible values of this new field to Yes ( or Y or YES, depending on the values defined in the dropdown).

Mohit_Agrawal
Frequent Visitor
Solution

Re: Run rule only once

Hello,

 

If you want the rule to run only once based on some default value in the field, then you can configure it as "Apply at Creation"..

 

If you need to run the rule only once when field is changed manually by the user then I dont think this could run only once. it'd always run whenever the field changes.

 

Thanks!!

Mohit Agrawal

Please accept it as solution if this resolves your query and don;t forget to give KUDOS!! :)

Utkarsh_Mishra
Honored Contributor

Re: Run rule only once

In your SQL part of the rule, put the DECODE condition like

 

If field (result) values is null then change the value, else do not update.

 

Using decode you can achive this.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
//Add this to "OnDomLoad" event