GetProfileValue

You can use this function for Optiva Workflows.

Purpose

The function GetProfileValue returns the profile value for the corresponding key that is passed in.

Syntax

string[] GetProfileValue(string attribKey)

Return Value

If the code is sent successfully, the profile value is displayed as string[].

Arguments

Part Description
GetProfileValue(name) The name of the profile attribute for which you are retrieving the value.

Description

This function returns the value for the specified profile attribute. The value matches the value that is defined for the user who is running the script.

Suppose User 1 has a value of 3 defined for the Security.FailedLoginLimit profile attribute. User 2 has a value of 5 defined for that profile attribute.

When User 1 runs this script, a value of 3 is returned. When User 2 runs this script, a value of 5 is returned.

Example

This example returns the value that is defined for the Security.FailedLoginLimit profile attribute. The value that is returned matches the value that is defined for the user who is running the script.


Dim ProfileAttribute as string = "SECURITY.FAILEDLOGINLIMIT"
Dim AttributeValues() as String = GetProfileValue(ProfileAttribute)

Example 1:

string[] retVal = GetProfileValue("AUTOUNLOCKTIME");

Return: This returns value of profile attribute AUTOUNLOCKTIME and to retrieve the value use retVal[0]

Example 2:

string[] retVal = GetProfileValue("IDM*");

Return: This returns the values of profile attributes which start with IDM and to retrieve the desired values use a for loop.