UserCustomData (PQL)

Returns the value of the 'custom data' property set when using APIs to build login credentials .

  • Returned Output: Text
  • Library: PQL \ Granular \ Identity
  • Version: 2023.00.000
  • Compatibility: Pyramid Query Language (PQL) data sources

Syntax

UserCustomData()

Comments
  • The function returns a value, rather than performing an operation on a given column.
  • 'Custom Data' is a set of values that may have been injected into a user's authentication programmatically using APIs. It is designed as a mechanism to surface user-specific values from outside the app that can be used inside the app formulaically. This function (and its cousin functions) are the end points for that exercise.
  • For details on how to employ and use this function see the custom column overview.
Different Function types
  • This function is similar to the PQL common functions of the same name. However, it operates inside the query at the grain.
  • As a granular function, it is used in the base SQL query itself.

Examples

This example injects the current user's custom data value into a another function (IF) to derive each items values in a column. If the values in the lookup column of the country table match the current user's custom data value, then it returns true, otherwise it returns false. The resulting column can then be used to drive access to the list of countries.

If([Country].[Lookup]==CustomData(), true, false)