Getting the identifier of a group by full path name in a common contact list.
function mGetDepartmentIDByTextPath(sPath: string): integer;
Parameter |
Type |
Value |
---|---|---|
sPath |
string |
full path to the group, beginning from a root of the tree-like list. The letter case is important. The delimiter is the backslash ("\"). |
>0 |
group identifier; |
-1 |
invalid path specified. |
var
iID: integer;
begin
iID := mGetDepartmentIDByTextPath('MyChat\Teamleads deevelopers');
mLogScript(inttostr(iID), '');
end.
[19:58:02] (Log "mGetDepartmentIDByTextPath"): 13
[19:58:02] (Run "mGetDepartmentIDByTextPath"): Script operation time: 5 ms
[19:58:02] (Run "mGetDepartmentIDByTextPath"): Script done successfully.