Is an Object in a workflow?

This entry is part of the Conditional Expressions HowTo.

If you need to make a field or an object readonly if it has an active and running workflow you are in right place!
All you need is a conditional expression that can be used in conditional UI or data restriction.
The following conditional expression evaluate to true if a Work Order is in a workflow.
  • Name: WOINWF
  • Description: True if WO is in WF
  • Expression: exists (select 1 from wfassignment where assignstatus='ACTIVE' and ownertable='WORKORDER' and ownerid=:workorderid )
If you need the opposite behaviour use this other conditional expression.
  • Name: WONOTINWF
  • Description: False if WO is in WF
  • Expression: not exists (select 1 from wfassignment where assignstatus='ACTIVE' and ownertable='WORKORDER' and ownerid=:workorderid )
Those expressions can be easily be modified to work with any object.

Now just use this conditional expression in the Application Designer or in Security Groups to change the behavior of such objects.

Comments