We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Advanced Condition "changes to"

xiaix
Tera Guru

Trying to convert this:

find_real_file.png

Into script.

Example:

find_real_file.png

I know that my .CHANGESTO is illegal, but It's to illustrate my point.

How can I get "changes to" into script?

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi David,



In a before or after business rule, you can use current.field.changesTo(value).



Example:



current.active.changesTo(false)


View solution in original post

8 REPLIES 8

Chuck Tomasi
Tera Patron

Hi David,



In a before or after business rule, you can use current.field.changesTo(value).



Example:



current.active.changesTo(false)


Chuck, it's a "Notification" on the Approval (sysapproval_approver) table.     Will your method still work?




find_real_file.png


Hi David,



Yes, it will work in a notification. I just tried it with one of mine.



answer = current.state.changesTo('new')


Thanks, Chuck!