Forum Discussion
- OSAdminValued ContributorOriginally posted by Eric Osmanski
Finally getting back to this..Eric Osmanski. How does this look? Basically I want the admin to open a form to select account DataLock as either Lock/Unlock. If the account is Lock and user in WF_Allocation_Access then they can input data. If not NoInput.
Dim curCC As String = api.Pov.UD1.Name
Dim curTime As String = api.Pov.Time.Name
Dim curScenario As String = api.Pov.Scenario.Name
Dim curCube As String = api.Pov.Cube.NameDim reviewLevel As String
Dim securityGroup As Boolen
Dim wfGroup As Boolen
Dim LockStatus As String'Should be in the similar POV as trigger
'Process DataLock set to Lock to trigger rule
'Allow access to wfGroup WF_Allocation_Access all other groups set to NoInputDim DataLock As DataCell = api.Data.GetDataCell(""Cb#DODI_RigPlan:E#GlobalCC:C#Local:V#Periodic:A#DataLock:F#Input_USD:O#Forms:I#None:U1#None:U2#NoLocation:U3#NoRigStatus:U4#None:U5#NoLaborCat:U6#None:U7#None:U8#Stat_Input"")
securitGroup = BRApi.Security.Authorization.IsUserInGroup(si, ""WF_ReviewLevel"" & reviewLevel)
wfGroup = BRApi.Security.Authorization.IsUserInGroup(si, ""WF_Allocation_Access"")If wfGroup = True
If securitGroup = True
If LockStatus = ""Lock"" Then
Return ConditionalInputResultType.Default
Else
Return ConditionalInputResultType.NoInput
End if
End if
End if
in your current rule you are never setting LockStatus
Looks pretty good, but I assume they are going to enter a 1 or 0 (your GetDataCell is going to return a numeric value). So then you have to change ""If LockStatus = ""Lock"" to ""If DataLock.CellAmount = ""1"""" or 0....
Related Content
- 2 years ago
- 6 months ago
- 2 years ago
- 2 years ago
- 5 months ago