Overslaan naar hoofdinhoud
Inhoudsopgave overslaan

[LASTVALUE] - Een vorige waarde ophalen uit de geschiedenis

De [LASTVALUE] function allows you to retrieve the most recent previous value of an attribute from the history of a user, group, or department. This function pulls the previous value directly from the object's history log, not from its currently registered attributes.

This is useful for creating notifications or reports that show what has changed, such as displaying both an old and new department name after a user is moved.


Syntax

The basic syntax is:

CODE
[LASTVALUE;AttributeName].
  • AttributeName: The name of the attribute as it appears in the object's history, written without brackets.


Gebruikscases

Basic Value Retrieval

To get the previous value for an attribute, simply specify the attribute name. For example to get the previous department number for a primary position, simply write;

CODE
[LASTVALUE;Department Number]

This retrieves the last recorded value for Afdelingsnummer from the object's history.

Fallback to Current Value if History is Empty

You can use the [IFEMPTYUSE] function to display the current value of an attribute if no previous value exists in the history.

CODE
[IFEMPTYUSE;[LASTVALUE;Department Number];[DepartmentNumber]]

This expression first attempts to get the LASTVALUE. If that returns empty, it provides the currently registered AfdelingNummer as a fallback.

Advanced Combination: Find Previous Manager's Name

You can combine LASTVALUE, IFEMPTYUSEen REFERENCE to perform more complex lookups, such as finding the name of a previous manager. To get the previous manager's name, or the current manager's name as a fallback write:

CODE
[REFERENCE;DisplayName;UserId;1;[IFEMPTYUSE;[LASTVALUE;Manager];[manager]]]

JavaScript-fouten gedetecteerd

Let op: deze fouten kunnen afhankelijk zijn van de instellingen van je browser.

Als dit probleem zich blijft voordoen, neem dan contact op met onze supportafdeling.