Is an Object in a workflow?
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 )
- 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 )
Now just use this conditional expression in the Application Designer or in Security Groups to change the behavior of such objects.
Sometimes the fields that you would like to show in the inbox are not always available from the inbox portlet in Start Center. In that case, you might want to use a relationship to display the extra field.
Below are the steps to add the schedule start date from the Changes application to the workflow inbox:
1. Go to Database Configuration application
Bring up WFASSIGNMENT object
Go to Relationships tab
Click New Row to add a new relationship called CHANGEWFASSIGNMENT
Child object should be WOCHANGE
Where Clause expression will be like this
woclass='CHANGE' and workorderid=:ownerid
2. Run the
update statement below to use the relationship to fetch schedule start date from the wochange object:
UPDATE inbxconfig SET INBXCOLUMN='CHANGEWFASSIGNMENT.SCHEDSTART',DESCRIPTION='SCHEDSTART' where inbxcolumn='ASSIGN_01';
We need to execute the SQL statement every time we've a new user.
As an alternative, setup an escalation with an action to setvalue to 'CHANGEWFASSIGNMENT.SCHEDSTART' for new users
Attach the following action if the inbox column is still 'ASSIGN_01'
action = set inbxcolumn
object = inbxconfig
type = setvale
value = 'CHANGEWFASSIGNMENT.SCHEDSTART'
3. Go to the Start Center Inbox
Click Edit Portlet
4. Select Display checkbox besides the CHANGEWFASSIGNMENT.SCHEDSTART column
Click the Finished button
Schedule start date from WOCHANGE object will be displayed in the start center inbox like below: