Preferences Component

Fnd_Pref_UserName

Fnd_Pref_UserName (name; value {; scope})

Legacy manual page 181

Parameters

ParameterTypeDescription
nameTextName of the preference item
valueTextThe new preference value
scopeLongintThe preference’s scope (optional)

Description

This routine gets and sets the current user name used by the Preferences component. When setting a server preference, the preference is stored with the current user’s name. By default the value returned by 4D’s Current user function is used. But if you do not use 4D’s password system then everybody’s name becomes “Designer,” and everyone shares the same preferences (use this component’s shared preferences feature if you want to do this). So to specify a unique name for each user, you can pass the user’s name (or any other unique text identifier) to this function:

Fnd_Pref_UserName (String([User]ID))

This method can also be called as a function to get the current user name setting:

$userName_t:=Fnd_Pref_UserName
Extracted source text
            Fnd_Pref_UserName (name; value {; scope})

              Parameter               Type              Description
              name                    Text              Name of the preference item
              value                   Text              The new preference value
              scope                   Longint           The preference’s scope (optional)

            This routine gets and sets the current user name used by the Preferences component. When setting a
            server preference, the preference is stored with the current user’s name. By default the value returned
            by 4D’s Current user function is used. But if you do not use 4D’s password system then everybody’s
            name becomes “Designer,” and everyone shares the same preferences (use this component’s shared
            preferences feature if you want to do this). So to specify a unique name for each user, you can pass the
            user’s name (or any other unique text identifier) to this function:
              Fnd_Pref_UserName (String([User]ID))

            This method can also be called as a function to get the current user name setting:
              $userName_t:=Fnd_Pref_UserName