Skip to content

UDL_EXPORT ​

UDL_EXPORT is an AdoScript command available through the ImportExport messageport within the ADOxx Development Toolkit.

Syntax ​

leo-grammar
CC "ImportExport" UDL_EXPORT file:strValue 
				( userids:tokenStr [ usergroupids:tokenStr ] | usergroupids:strValue [ userids:tokenStr ] )
				[ with-users:boolValue ] [ with-usergroups:boolValue ] [ with-password:boolValue ] 
				[ overwrite-file:boolValue ]  [ silent ].

#--> RESULT ecode:intValue 
			errtext:strValue
CC "ImportExport" UDL_EXPORT file:strValue 
				( userids:tokenStr [ usergroupids:tokenStr ] | usergroupids:strValue [ userids:tokenStr ] )
				[ with-users:boolValue ] [ with-usergroups:boolValue ] [ with-password:boolValue ] 
				[ overwrite-file:boolValue ]  [ silent ].

#--> RESULT ecode:intValue 
			errtext:strValue

Parameters ​

  • file (strValue) - the path to the target file.
  • userids (tokenStr) - a space-separated string holding the IDs of users to be exported.
  • usergroupids (tokenStr, optional) - a space-separated string holding the IDs of usergroups to be exported.
  • with-users (boolValue, optional) - flag determining whether user data is to be exported (default value is 1).
  • with-usergroups(boolValue, optional) - flag determining whether usergroup data is to be exported (default value is 0).
  • with-password(boolValue, optional) - flag determining whether user passwords are to be exported (default value is 0).
  • overwrite-file(boolValue, optional) - flag determining whether an existing file is to be overwritten (default value is 0).
  • silent (modifier,optional) - flag determining whether all error- and success-messages are supressed (default value is "Not suppressed").

Returns ​

  • ecode (intValue) - Contains the error code or 0 in case of success.
  • errtext (strValue) - Value contains an error text that can be displayed.

Details ​

According to its dialog-based counterpart it performs the export of ADOxx users to an UDL file, allowing for various options to control the export process.

Pssible errtext values are

  • Invalid Parameters
  • File exists
  • File cannot be created
  • File cannot be overwritten
  • Directory has been passed
  • No valid IDs
  • UDL export successfull
  • UDL export failed

See Also ​

UDL_IMPORT

Examples ​

asc
CC "AdoScript" FILE_DIALOG saveas filter1:"UDL Files" type1:"**.udl"
IF (endbutton != "ok")
{
   EXIT
}

CC "UserMgt" GET_USERID user:"Superman"
SET sUserIDs: (STR userid)
CC "UserMgt" GET_USERID user:"Supergirl"
SET sUserIDs: (sUserIDs + " " + (STR userid))

CC "UserMgt" GET_USERGROUPID usergroup:"Beatles"
SET sUserGroupIDs: (STR usergroupid)

CC "ImportExport" UDL_EXPORT file:(path) userids:(sUserIDs) usergroupids:(sUserGroupIDs) with-usergroups:1 with-password:1 overwrite-file:1

IF (ecode = 0)
{
   CC "AdoScript" INFOBOX (errtext) title:"UDL Export"
}
ELSE
{
   CC "AdoScript" ERRORBOX (errtext) title:"UDL Export"
}
CC "AdoScript" FILE_DIALOG saveas filter1:"UDL Files" type1:"**.udl"
IF (endbutton != "ok")
{
   EXIT
}

CC "UserMgt" GET_USERID user:"Superman"
SET sUserIDs: (STR userid)
CC "UserMgt" GET_USERID user:"Supergirl"
SET sUserIDs: (sUserIDs + " " + (STR userid))

CC "UserMgt" GET_USERGROUPID usergroup:"Beatles"
SET sUserGroupIDs: (STR usergroupid)

CC "ImportExport" UDL_EXPORT file:(path) userids:(sUserIDs) usergroupids:(sUserGroupIDs) with-usergroups:1 with-password:1 overwrite-file:1

IF (ecode = 0)
{
   CC "AdoScript" INFOBOX (errtext) title:"UDL Export"
}
ELSE
{
   CC "AdoScript" ERRORBOX (errtext) title:"UDL Export"
}

First the file dialog is opened and the user enters an UDL file. Then the users Superman and Supergirl are exported to this file. An Info- or Errorbox reports whether the export has succeeded.

Versions and Changes ​

Available since ADOxx 1.3