Method: Exists for AssignmentList <Data>
- Updated2024-09-12
- 1 minute(s) read
Internal Data > Methods > Method: Exists for AssignmentList <Data>
Method: Exists for AssignmentList <Data>
Checks in the script interface for internal data whether an assignment with the specified text value already exists in an assignment channel.
bExists = Object.Exists(Value)
| Object | AssignmentList <Data> Object with this method |
| Value | String Specifies which text value of the assignment to check. |
| bExists | Boolean The value is TRUE if an assignment with the specified text value already exists. |
The following example generates an assignment channel with three assignments and displays whether an assignment with the textual value text2 already exists:
| VBScript | Python |
Dim oMyGrp, oMyChn, oMyAssgnList Set oMyGrp = Data.Root.ChannelGroups(1) Set oMyChn = oMyGrp.Channels.AddAssignmentChannel("MyAssignmentChn","Default Value") Set oMyAssgnList = oMyChn.AssignmentList Call oMyAssgnList.Add("text1",1) Call oMyAssgnList.Add("text2",2) Call oMyAssgnList.Add("text3",3) Call MsgBoxDisp(oMyAssgnList.Exists("text2"))