Function to get a name of a WEB support operators group by its numeric ID.

 

Syntax

function mGetWebSupportGroupNameByID(iID: integer): string;

 

Parameters and return values

Parameter

Type

Value

ilD

integer

group ID.

 

Function result

Group name, text string. If a group does not exist, the function returns an empty string.

 

Example


const
  TOTAL = 10;
var
  i, iCount: integer;
  sName: string;
begin
  iCount := 0;
  
    for i := 1 to TOTAL do begin
      sName := mGetWebSupportGroupNameByID(i);
      
        if length(sName) > 0 then begin
          inc(iCount);
          mLogScript('Group ID: ' + IntToStr(i) + ', "' + sName + '"', '');      
        end;
    end;
    if iCount = 0 then mLogScript('No any web support groups found', '')
      else mLogScript('There are ' + IntToStr(iCount) + ' web support groups found', '');    
end.


Script work result

[16:51:10] (Log "mGetWebSupportGroupNameByID"): Group ID: 1, "MyChat Web Support"

[16:51:10] (Log "mGetWebSupportGroupNameByID"): Group ID: 2, "Developers"

[16:51:10] (Log "mGetWebSupportGroupNameByID"): There are 2 web support groups found

[16:51:10] (Run "mGetWebSupportGroupNameByID"): Script operation time: 3 ms

[16:51:10] (Run "mGetWebSupportGroupNameByID"): Script done successfully.

 

See also

Inc

IntToStr

Length

mLogScript