Skip to content

GET_ALL_ATTRPROF_SUBDIRS

GET_ALL_ATTRPROF_SUBDIRS returns a list of all subdirectory ids of directory apdirid.

Syntax

leo-grammar
CC "Core" GET_ALL_ATTRPROF_SUBDIRS [apdirid:id] .


#-->RESULT ecode:intValue apdirids:ids
CC "Core" GET_ALL_ATTRPROF_SUBDIRS [apdirid:id] .


#-->RESULT ecode:intValue apdirids:ids

Parameters

  • apdirid (idValue) - the optional parametere apdirid specifies the parent directory.

Returns

  • ecode (intValue) - the result ecode is set to zero if function succeeded and to a non zero value if failed.
  • apdirids (intValue) - s, the result apdirids holds a list of all subdirectory ids.

Details

If no parent directory is specified GET_ALL_ATTRPROF_SUBDIRS returns all super directories.

See Also

Examples

asc
# get all subdirs of root directory
CC "Core" GET_ALL_ATTRPROF_SUBDIRS
IF (ecode!=0)
{
  CC "AdoScript" ERRORBOX ("Error in GET_ALL_ATTRPROF_SUBDIRS")
  EXIT
}

# get all directory names
SET items:("")
FOR id in:(apdirids)
{
  CC "Core" GET_ATTRPROF_DIRECTORY_NAME apdirid:(VAL id)
  IF (ecode!=0)
  {
    CC "AdoScript" ERRORBOX ("Error in GET_ATTRPROF_DIRECTORY_NAME!")
    EXIT
  }
  SET items:(items+(apdirname)+"@")
}

# check if any directories found
IF (LEN(apdirname)=0)
{
  CC "AdoScript" ERRORBOX ("No apdirnames!")
  EXIT
}

# delete last token
SET items:(copy(items,0,LEN(items)-1))

# show all entries
CC "AdoScript" LISTBOX title:"AttrProfSubDirs" entries:(items) toksep:"@" oktext:"OK" boxtext:"SubDirs found:"
# get all subdirs of root directory
CC "Core" GET_ALL_ATTRPROF_SUBDIRS
IF (ecode!=0)
{
  CC "AdoScript" ERRORBOX ("Error in GET_ALL_ATTRPROF_SUBDIRS")
  EXIT
}

# get all directory names
SET items:("")
FOR id in:(apdirids)
{
  CC "Core" GET_ATTRPROF_DIRECTORY_NAME apdirid:(VAL id)
  IF (ecode!=0)
  {
    CC "AdoScript" ERRORBOX ("Error in GET_ATTRPROF_DIRECTORY_NAME!")
    EXIT
  }
  SET items:(items+(apdirname)+"@")
}

# check if any directories found
IF (LEN(apdirname)=0)
{
  CC "AdoScript" ERRORBOX ("No apdirnames!")
  EXIT
}

# delete last token
SET items:(copy(items,0,LEN(items)-1))

# show all entries
CC "AdoScript" LISTBOX title:"AttrProfSubDirs" entries:(items) toksep:"@" oktext:"OK" boxtext:"SubDirs found:"

Versions and Changes

Available since ADOxx 1.3