Restrict users to only selecting sub-items in list fields
Question ID: 106437
0
0

We have several list fields that have a general category as the first level of the list. We then have sub-items under this primary category in order for the users to select. Is there a way to restrict users to only selecting the sub-items? I have been trying to accomplish through workflow but not able to do so.

Marked as spam
Posted by (Questions: 122, Answers: 3)
Asked on October 8, 2015 7:20 pm
33 views
Answers (1)
0
Private answer

Below is an example of how this can be done using workflow:

Function Bug_FieldCanChange(FieldName, NewValue)
On Error Resume Next

Bug_FieldCanChange = DefaultRes

If FieldName = ''BG_USER_06'' Then
Dim ListName, Flag

ListName = Bug_Fields.Field(''BG_USER_06'').List.Name

Set oLists = TDConnection.Customization.Lists

If oLists.IsListExist(ListName) = ''True'' Then
Set oList = oLists.List(CStr(ListName))
Set oListRoot = oList.RootNode
For Each Child in oListRoot.Children
If Child.Name = NewValue Then
Flag = 1
End If
Next

If Flag = 1 Then
MsgBox ''You must choose a secondary selection.''
Bug_FieldCanChange = False
End If

Set oListRoot = Nothing
Set oList = Nothing
End If

Set oLists = Nothing

End If

On Error GoTo 0
End Function

Marked as spam
Posted by (Questions: 3, Answers: 168)
Answered on October 8, 2015 7:21 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top