Environment Variables in RCDC

When using the FIM or MIM Portal you will often struggle with the RCDC configuration. Making it dynamic is often one of the things we try to achieve. A nice little feature we can use in this case are the Environment Variables available in RCDC.

The following variables are available to us

%LoginID%
Displays the ObjectID of the user who is currently logged in.
This can for example be used to list “My Direct Reports” using an xPath similar to /Person[Manager=’%LoginID%’]

%LoginDomain%
Displays the domain of the user who is currently logged in.

%Today%
Displays the current date and time

%FromToday_nnn%
Displays the current date, plus nnn and time. nnn is an integer.

%ObjectID%
The RCDC primary resource ObjectID. This can be used to list Groups using an xPath similar to /Group[DisplayedOwner=’%ObjectID%’]

%Attribute_xxx%
Returns a specified attribute, xxx, of the RCDC primary resource. This can be used to search or list based on some attribute of the object we are managing. It can also be used in text.
This little control example shows how to create a MailLink that takes the Email attribute of the object to build a UocHyperLink with mailto: function.

<my:Control my:Name="MailLink" my:TypeName="UocHyperLink" my:Caption="{Binding Source=schema, Path=Email.DisplayName}" my:Description="" my:RightsLevel="{Binding Source=rights, Path=Email}">
 <my:Properties>
  <my:Property my:Name="Text" my:Value="{Binding Source=object, Path=Email, ModeTwoWay}"/>
  <my:Property my:Name="NavigateUrl" my:Value="mailto:%Attribute_Email%"/>
 </my:Properties>
</my:Control>

In the UI this could look something like in the picture below.
MailLink.RCDC.Example
Using Environment Variables when using the RCDC really increases the usability of the Portal so please start using them!

Leave a Reply

Your email address will not be published. Required fields are marked *