Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Editing the sample Personnel Import Utility (PIU) XSL files.

Building Automation Knowledge Base

Schneider Electric Building Automation Knowledge Base is a self-service resource to answer all your questions about EcoStruxure Building suite, Andover Continuum, Satchwell, TAC…

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Knowledge Center
  • Building Automation Knowledge Base
  • Editing the sample Personnel Import Utility (PIU) XSL files.
Options
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close

Related Forums

  • Intelligent Devices Forum

Previous Next
Contributors
  • CraigEl
    CraigEl
  • Product_Support
    Product_Support
  • BillNeville
    BillNeville

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to Building Automation Knowledge Base
Options
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
0 Likes
1290 Views

Link copied. Please paste this link to share this article on your social media post.

Trying to translate this page to your language?
Select your language from the translate dropdown in the upper right. arrow
Translate to: English
  • (Français) French
  • (Deutsche) German
  • (Italiano) Italian
  • (Português) Portuguese
  • (Русский) Russian
  • (Español) Spanish

Editing the sample Personnel Import Utility (PIU) XSL files.

Picard Product_Support
‎2018-09-06 02:48 PM

Last Updated: Administrator CraigEl Administrator ‎2022-08-14 10:34 PM

Issue

Proper way to 'activate' portions of Personnel Import Utility (PIU) XSL files.

Product Line

Andover Continuum

Environment

CyberStation with PIU

Cause

Difficulty in getting transformation file to import records

Resolution

Transformation files used with the PIU are located in the \Continuum directory. These are XSL files and are built in a way that features are commented out in the file and those features can be 'activated' by uncommenting. XSL is a language for expressing style sheets. An XSL style sheet is a file that describes how to display an XML document of a given type.

When the XSL files are opened with Internet Explorer (IE) you see color-coding and bold text. The bold text is activated, the light grey is not. You can only view the code in IE, not edit it. Use an advanced text editor like Notepad ++ (https://notepad-plus-plus.org/) and you can easily see and edit the file to activate portions of it.

Note: Make sure when 'activating" the syntax option in the file by removing the leading  - <!--   you also remove the trailing   --> . 

The following is what the file CSVToContinuumTransformation.xsl looks like.

 

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                xmlns:TAC="http://www.tac.com/TAC"
                extension-element-prefixes="msxsl"
                exclude-result-prefixes="TAC">

  <!-- 
    - define the Javascript or C# or VBScript functions that you want to include within a msxsl:script element.
    - language indicates the scripting language
    - implements-prefix gives the namespace prefix that you declared for your function (i.e. TAC) 
    - Use the functions where ever you want. For example 
      <alias>
        <xsl:value-of select="TAC:today()" />
      </alias>
  -->
  
  <msxsl:script language="C#"
                implements-prefix="TAC">

  <!-- it's often helpful to use a CDATA section so you don't have to worry about escaping less-than signs or anything -->
  <![CDATA[

       public string today() {
          return "abcdefs";
   }
   ]]>
  </msxsl:script>

  <!--
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" indent="yes"/>-->
  
  <xsl:template match="SourceUsers">
	  <SourceUsers>
			<xsl:apply-templates select="SourceUser"/>
		</SourceUsers>
	</xsl:template>

  <!-- Need to include only the mapped personnel attributes or if every thing everything is added remove the ones that are included below in XSLT tags-->
  <xsl:template match="SourceUser">
  <!-- You can declare variables, parameters -->
  <xsl:param name="allPhoneNumbers" select="HomePhone"/>

    <xsl:copy>
			<xsl:copy-of select="ADA|Address|AllowEntEntEgr|Blood|CardNumber|CardType|City|Country|DateOfBirth|DefaultClearanceLevel|
				Department|DepartmentCode|EmergencyContact|EmergencyPhone|EmpNumber|ExecutivePrivilege|ExpirationDate|EyeColor|
				FirstName|HairColor|Height|HomePhone|Info1|Info2|Info3|Info4|Info5|Info6|JobTitle|LastName|LicenseNumber|
				LostCard|MiddleName|NonABACardNumber|OfficeLocation|ParkingSticker|PIN|SecurityLevel|Sex|SiteCode|
				SocSecNo|StateOfResidence|StartDate|Supervisor|VehicleInfo|Visitor|Weight|WorkPhone|Zip|FipsAgencyCode|FipsOrgId|
			        FipsSystemCode|FipsCredentialNumber|FipsCredentialSeries|FipsOrgId|FipsCredentialIssue|FipsOrgCategory|FipsPersonId|
				FipsPersonOrgAssociation|FipsPivState|FipsPivControlled|FipsExpirationDate|PhotoFile|Signature|ResponseTransaction|State|FipsHmac"/>
			
			
			<!--<Adding OwnerFolder to personnel object. This is must other wise it won't create or update any objects>-->
			<OwnerFolder>Root\CardHolders</OwnerFolder>
			<!--<Adding OwnerFolder to personnel object end>-->

      <!--<Alias is necessary to create or update object and it should be unique in the system>-->
      <Alias>
        <!-- By default, we'll use the employeeNumber + samaccountname as an alias (16 chars max). -->
        <!-- On newer systems, the logon name is userPrincipalName -->
        <!-- One Way -->
        <!--  <xsl:value-of select="concat(samaccountname,EmpNumber)"/> -->
        <!--<xsl:value-of select="concat(FirstName,LastName)"/>-->
        <!--In IDMS system Serial Number is a unique number. Use this as Alias added to a Character or 
        a group of characters to generate a valid alias. See the Example -->
        <xsl:value-of select="concat(FirstName,LastName)"/>
        
        <!--<xsl:choose>
          <xsl:when test="string-length(EmpNumber)=0">
            <xsl:value-of select="samaccountname"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="concat(LastName,EmpNumber)"/>
          </xsl:otherwise>
        </xsl:choose>   -->
        
        <!-- Other Ways -->
        <!-- This option combines the last name  and EmpNumber -->
        <!--<xsl:value-of select="concat(substring(LastName,1,12),substring(EmpNumber,2,5))"/>-->
        <!-- This option combines the EmpNumber last and first name from CyberStation -->
        <!--<xsl:value-of select="concat(EmpNumber,FirstName,LastName)"/> -->
        <!-- This option combines the last name  and FirstName -->   
        <!--<xsl:value-of select="concat(LastName,  FirstName)"/>-->
      </Alias>
      <!-- Example of using User defined functions -->
      <!-- <alias>
        <xsl:value-of select="TAC:today()" />
      </alias>-->
      <!--<Adding departmentcode DepartmentCode to personnel object if it contains only numbers>-->
			<!--<<xsl:value-of select="number(department)"/>-->
      <!--
        <DepartmentCode><xsl:number value="Department" /></DepartmentCode>
      -->
				
      <!--<Adding CardType>-->
       <!--<CardType>AC4plus432</CardType>-->

      <!--<Adding SiteCode>-->
      <!--<SiteCode>15</SiteCode>-->

      
      <!--<Adding Signature, PhotoFile, FingerPrint use firstname.jpg or Lastname.jpg or Firstname+LastName.jpg. Use 
        the combination depending upon the jpg files stored on the hard drive. A few examples below >-->

      <!--<Adding Signature>-->
      <!--<Signature>D:\picsForSri\signatures\LISASIG.BMP</Signature>-->
      <!--<Signature>
	<xsl:value-of select="concat('D:\',FirstName,'.jpg')"/>
      </Signature>-->

      <!--<Signature>
	<xsl:value-of select="concat('c:\',Lastname,'.jpg')"/>
      </Signature>-->

      <!--<Adding FingerPrint>-->
      <!--<FingerPrint>D:\picsForSri\Fingerprints\Finger.jpg</FingerPrint>-->

      <!--<Adding photofile>-->
      <!--<PhotoFile>D:\picsForSri\pics\Elmer1.jpg</PhotoFile>-->

      <!--Assigning default areas to the imported personnel-->

      <!-- To implement Area Links, uncomment the section below before the <AreaLinks> tag and after the </AreaLinks> tag-->
      <!-- To add more areas, copy the <AreaLink></AreaLink> tags and everything between them and paste after the first </AreaLink> tag-->
      <!-- State can be Enabled or Disabled, Preload is Workstation Only and can be True or False, AreaId example - Root\MyPersonnelFolder. -->

      <!-- This is line 1 of 2 to remove to implement Area Links
      <AreaLinks>
        <AreaLink>
          <AreaId><![CDATA[Full Path To Area Here]]></AreaId>            
          <SchedId>Full Path To Schedule Here</SchedId>
          <State>Enabled</State>
          <Preload>False</Preload>
          <ClearanceLevel>0</ClearanceLevel>
        </AreaLink>                    
      </AreaLinks>
      This is line 2 of 2 to implement Area Links  -->

      <!--<Adding Templates to personnel object>-->
      <!--<Adding Templates to personnel object with Department name>-->
			<!--<RefTemplate>
				<xsl:value-of select="concat('Root\Templates\Personnel Templates\',  Department)"/>
			</RefTemplate>-->

      <!--<Adding Templates to personnel object based on department>-->
      <!--<Can do the same way with departmentCode DepartmentCode>-->
      <!--<xsl:value-of select=AreaTemplate1000/> same as <xsl:text>AreaTemplate1000</xsl:text>-->

      <!--<RefTemplate>
        <xsl:choose>
          <xsl:when test="StateOfResidence='MA'">
            <xsl:text>Root\Templates\Personnel Templates\AllAccess</xsl:text>
          </xsl:when>
          <xsl:when test="StateOfResidence='NY'">
            <xsl:text>Root\Templates\Personnel Templates\PowerUser</xsl:text>
          </xsl:when>
          <xsl:otherwise>
            <xsl:text>Root\Templates\Personnel Templates\StandardUser</xsl:text>
          </xsl:otherwise>
        </xsl:choose>
      </RefTemplate>-->
      <!--<Adding one  personnel Template to personnel object >-->
      <!--<RefTemplate> Root\Templates\Personnel Templates\PT1</RefTemplate>-->

	  <!--Template>
        <xsl:choose>
          <xsl:when test="StateOfResidence='MA'">
            <xsl:text>Root\Templates\Personnel Templates\All Access</xsl:text>
          </xsl:when>
          <xsl:when test="StateOfResidence='PA'">
            <xsl:text>Root\Templates\Personnel Templates\Power User</xsl:text>
          </xsl:when>
		  <xsl:when test="StateOfResidence='NY'">
            <xsl:text>Root\Templates\Personnel Templates\Standard User</xsl:text>
          </xsl:when>
        </xsl:choose>
      </RefTemplate>-->
      <!--<Adding one  personnel Template to personnel object >-->
      <RefTemplate>Root\Templates\Personnel Templates\Standard User</RefTemplate>-->

      <!-- Manipulate states-->
      <!-- If the attribute is using here don't add it at the <xsl:copy-of select-->
      <!--
      <StateOfResidence>
        <xsl:choose>
          <xsl:when test="StateOfResidence='Massachusetts'">
            <xsl:text>MA</xsl:text>
          </xsl:when>
          <xsl:when test="StateOfResidence='New Hampshire'">
            <xsl:text>NH</xsl:text>
          </xsl:when>
          <xsl:when test="StateOfResidence='Washington DC'">
            <xsl:text>DC</xsl:text>
          </xsl:when>
          <xsl:when test="StateOfResidence='Connecticut'">
            <xsl:text>CT</xsl:text>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="StateOfResidence"/>
          </xsl:otherwise>
        </xsl:choose>
      </StateOfResidence>-->
      
      <!-- Manipulate phone numbers-->
  		<!--</telephonenumberFormat>-->
      <!--
        <WorkPhone>
          <xsl:choose>
          <xsl:when test="contains(WorkPhone,'-')">
            <xsl:value-of select="WorkPhone"/>
          </xsl:when>
            <xsl:when test="string-length(WorkPhone)=0">
              <xsl:value-of select="WorkPhone"/>
            </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="concat(substring(WorkPhone,1,3),'-',substring(WorkPhone,4,3),'-',substring(WorkPhone,7,4))"/>
          </xsl:otherwise>
           </xsl:choose>
        </WorkPhone>
      -->
      <!--Replacing the linefeed in the adress -->
      <!-- Unicode of linefeed &#xA; (is line break \n), Unicode of tab &#x9;-->
      <!-- <xsl:value-of select="translate(Address, '\n', ' ')"/> Won't work -->
      <!--
      <Address>
        <xsl:value-of select="translate(Address, '&#xA;', ' ')"/>
      </Address> -->

      <!--************************************************************** -->

      <!--These are the examples of how to parse Multi valued Active Directory attributes after mapping them to Continuum attributes -->
      <!-- Use Continuum attributes names instead of these dummy attribute names, variables names can be at as your wish -->

      <!-- This example takes the first element from the list, it shows the use of a variable -->
      <!--<HomePhone>
        <xsl:variable name="phoneNumbers" select='HomePhone'/>
        <xsl:value-of select="substring-before($phoneNumbers, ',')"/>
      </HomePhone>-->

      <!-- This example takes the second element from the list. -->

      <!-- It uses a param at the top of the file. after the line <xsl:template match="SourceUser">-->
      <!--Or use a local variable between phone2 tags<xsl:variable name="allPhoneNumbers" select='HomePhone'/>-->

      <!--
        <Phone2>
          <xsl:variable name="after-first-comma" select='substring-after($allPhoneNumbers,",")'/>
          <xsl:variable name="second-comma" select='substring-before($after-first-comma,",")'/>
          <xsl:value-of select="$second-comma"/>
        </Phone2>
      -->
      <!-- This example outputs a xml tag if the element exists in the list -->
      <!--
        <memberOf>
          <xsl:variable name="memberGroups" select="memberOf"/>
          <xsl:if test="contains($memberGroups, 'Engineering')">
            Engineering Lab1
          </xsl:if>
        </memberOf>
      -->

      <!--************************************************************** -->

    </xsl:copy>
	</xsl:template>
</xsl:stylesheet>
Labels (1)
Labels:
  • Andover Continuum
Tags (1)
  • Find more articles tagged with:
  • 11792
Was this article helpful? Yes No
No ratings

Link copied. Please paste this link to share this article on your social media post.

To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of