XSLT Function ResourceIdByActiveProfile

Returns an Id of the active logged-in user’s Resource Id.

NAMESPACE

xmlns:AS="http://schema.advantages.cz/AsapFunctions"

SYNTAX

string ResourceIdByActiveProfile()

REMARKS

The returned id is an Id field value from the Resource entity assigned to the current user.

EXAMPLE

This example assigns the current users’s resource id to a task.
Stylesheet

<?xml version="1.0" encoding="UTF-8"?> 
<xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
    xmlns:AS="http://schema.advantages.cz/AsapFunctions" 
    xmlns:date="http://exslt.org/dates-and-times" 
    exclude-result-prefixes="AS date"> 
    <xsl:template match="/"> 
        <Task Id="{AS:GenerateId()}" refResourceId="{AS:ResourceIdByActiveProfile()}" /> 
    </xsl:template> 
</xsl:stylesheet>