Custom Properties Between GLSU and Easy Workflow
Certain data from GLSU can be read by other insightsoftware products, such as Easy Workflow. For this, certain document properties are added in GLSU. The Pre Step Action or Post Step Action of a step in Easy Workflow can use the document properties to manage the data from Process Runner GLSU.
Below are the custom properties that works between the Easy Workflow and GLSU.
-
HideEverythingForSOD: it will make all the ribbon hide except the help button ,and will show a message that “Post button has been disabled because user at step 1 is identical to the user who is at step 2 of the workflow.”
Below is a sample code written for explanation: That lies in Pre step Action
Const MSO_STRING = 4
Const MSO_BOOLEAN = 2
Const EWFSTEP = "EWFGLSU_STEP"
Const EWFSTEPUSER = "EWFGLSU_STEPUSER"
Const STEP_NAME = "POST"
Const POST_DISABLE = "POST_DISABLE"
Const HideEverythingForSOD="HideEverythingForSOD"
'Const EWF_HideEvyForSOD = "hideEverythingForSOD" 'Aman Sharma PR-3715
Const HideEvyExctPost = "HideEverythingExceptPost" 'Aman Sharma PR-3715
Const HideEverything = "HideEverything" 'Aman Sharma PR-3715
Const SheetUnlock = "SheetUnlock"
Dim Wb As Microsoft.Office.Interop.Excel.Workbook
Wb = iSheet.Parent
' Mark the workbook with property EWFSTEP so GLSU can handle any EWF menu settings or other logic
Try
If CustomFieldsValue4.ToString= iUserName Then 'if the user at step1 & step2 of workflow found same
Wb.CustomDocumentProperties(EWFSTEP).Delete
Wb.CustomDocumentProperties(HideEverythingForSOD).Delete
Wb.CustomDocumentProperties.Add( HideEverythingForSOD, False, MSO_BOOLEAN, True )
Else
Wb.CustomDocumentProperties(EWFSTEP).Delete
Wb.CustomDocumentProperties(HideEverythingForSOD).Delete
Wb.CustomDocumentProperties.Add( EWFSTEP, False, MSO_STRING, STEP_NAME )
End If
Catch
If CustomFieldsValue4.ToString= iUserName Then
Wb.CustomDocumentProperties.Add( HideEverythingForSOD, False, MSO_BOOLEAN, True )
Else
Wb.CustomDocumentProperties.Add( EWFSTEP, False, MSO_STRING, STEP_NAME )
End If
End Try
-
Hide Everything: if we have a scenario in which we want to hide the complete ribbon except the help button, then use below code.
Const HideEverything = "HideEverything"
Wb.CustomDocumentProperties.Add( HideEverything, False, MSO_BOOLEAN, True )
-
Hide Everything Except Post: if we have a scenario in which we want to hide the complete ribbon except the help & post button, then use below code.
Const STEP_NAME = "POST"
Wb.CustomDocumentProperties.Add( EWFSTEP, False, MSO_STRING, STEP_NAME )
-
Sheet Unlock : this will unlock the complete sheet and all the tabs will be visible to user. And sheet is modifiable as well ,to do this use below code.
Const SheetUnlock = "SheetUnlock"
Wb.CustomDocumentProperties.Add( SheetUnlock, False, MSO_BOOLEAN, True )
SapLoggedInUser : this custom property key will show the name of the user who has validated the sheet and is loggedin.
And Some of the extra properties have been written as set, get for future requirement. Ex: CurrentEWFUser As String ,IsLastWorkflowRejected As Boolean,AutoPost As Boolean.
-
The below are some of items stored as doc properties as well:
System, Client, tcode, Autovalidate, checkhistory, postrange, postedby.