How to Import User data from an XML file

Visual LANSA Framework

How to Import User data from an XML file

Sign on as Administrator/ Designer.

(Administration) --> (Users).

Press the Import Users from XML button. The Framework will request a directory and filename.

Specify the name and location of your file and press Open.

The XML file of User data must be correctly formatted. The structure is the same as the exported XML. It should look like this:

<?xml version="1.0" ?> 

<EXTRACT>
  <USERS ACTION="UPDATE">
    <USER ACTION="UPDATE" UUSERPROFILE="FRED">
      <USEQUENCE TYPE="N" VALUE="1" /> 
      <UCAPTION LANG="ENG" VALUE="USER FRED" /> 
      <UHINT LANG="ENG" VALUE="" /> 
      <UICONNAME VALUE="VF_IC496" /> 
      <UUSEROBJECTTYPE VALUE="FRED_OBJ" /> 
      <UPASSWORD VALUE="FREDSPSWD" />
      <UEMAILADDRESS VALUE="[email protected]" /> 
      <UTEMPDIRECTORY VALUE="C:\DOCUME~1\user\LOCALS~1\Fred\" /> 
      <UDISABLED VALUE="FALSE" /> 
      <UADMIN VALUE="FALSE" /> 
      <UGROUPUSER VALUE="FALSE" /> 
      <USIGNOFFTIMEOUT TYPE="N" VALUE="0" /> 
      <USIGNONTIMEOUT TYPE="N" VALUE="0" /> 
      <GROUPS ACTION="REPLACE">
        <GROUP VALUE="GROUP_1" /> 
      </GROUPS>  
      <AUTHORITIES ACTION="REPLACE">
        <AUTHORITY TYPE="FRAMEWORK" OBJECT="SHIPPED_FRAMEWORK" VALUE="ALLOW" /> 
      </AUTHORITIES>
    </USER>
  </USERS>
</EXTRACT>

 

If you want to create a LANSA function that generates XML like this, start by looking at function UF_SYSBR/UFU0004.

Also see

The rules for Creating an XML file of User Data