OneIdentity / IdentityManager.Imx

HTML5 source code for Identity Manager web apps
Other
31 stars 121 forks source link

Configuration option: 'Filters for object selection' description text #107

Closed NielsDeGroot closed 8 months ago

NielsDeGroot commented 8 months ago

Administrator Portal: Configuration > Web Portal > Three-dots icon > Create configuration key

Filters for object selection Specify filter conditions (WHERE clauses) for foreign key columns. Enter column names in the format "

." (e.g. "MyTable.FirstColumn"). To refer to base object values, use the "%ColumnName%" syntax and to refer to the identifier of the current user, use the "%useruid%" variable.

Filters for object selection by table (Specify filter conditions (WHERE clauses) for foreign key columns. Enter table names in the format "" (e.g. "MyTable"). To refer to base object values, use the "%ColumnName%" syntax and to refer to the identifier of the current user, use the "%useruid%" variable.)

I configured the following:

Filters for object selection / Person.IsTemporaryDeactivated (PropertyConfig/FkWhereClausesByColumn/Person) %IsTemporaryDeactivated% = 0

Filters for object selection by table / Person (PropertyConfig/FkWhereClausesByTable/Person) %IsTemporaryDeactivated% = 0

After configuring errors like this will pop-up: _Person.UIDPerson where ((%IsTemporaryDeactivated% = 0))) as x ORDER BY InternalName, CentralAccount OFFSET 0 ROWS FETCH NEXT 20 ROWS ONLY System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'IsTemporaryDeactivated'.

The description text for configuring both these options should be (so without the percent signs around "%ColumnName%") ... To refer to base object values, use the "ColumnName" syntax and to refer to the identifier of the current user, use the "%useruid%" variable.)

Regards, Niels

NielsDeGroot commented 8 months ago

I reread the description text three more times it's ok if a little cryptic

hannoquest commented 7 months ago

Hello @NielsDeGroot ,

Filters for object selection / Person.IsTemporaryDeactivated (PropertyConfig/FkWhereClausesByColumn/Person)

This is not a valid setting because Person.IsTemporaryDeactivated is not a foreign-key (= object selection column).

Filters for object selection by table / Person (PropertyConfig/FkWhereClausesByTable/Person)

Simply use the value IsTemporaryDeactivated = 0.

The %ColumnName% syntax refers to values of the base object (the one whose reference you are setting), that is a different use case.