Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Rules in multi-language (MLU) configuration

SOLVED
Go to solution
Highlighted
TorstenNeumann
Super Collector

SQL Rules in multi-language (MLU) configuration

Hallo,

we have a SQL rule in a request type that sets a field's value (Drop-down validated by list) based on some other field's value. We are in a multi-language environment using German and English.

If the rule is defined with a German text in the selection and someone logs into PPM with an English session, then the rule throws an error message: "Could not set field '<field name >' to value '<some German value>' in Rule 1 - '<Rule Name>'.

Does anyone know a way to make a SQL rule aware of the current session language and select the necessary value accordingly from the KNTA_LOOKUPS_NLS or KNTA_LOOKUPS_LOC table?

I already searched the available documentation with no success.

Thanks for your help!

2 REPLIES
Etienne_Canaud
HPE Expert
Solution

Re: SQL Rules in multi-language (MLU) configuration

Hi Torsten,

The trick with MLU is to NOT hit the _NLS and _LOC tables, but instead hit the view that will expose the data from these tables using the language of the user currently connected.

So just write your SQL to target the KNTA_LOOKUPS view, and you''ll get the data in whatever language the connected user uses. If this is run without a user (in a background service, or possibly a scheduled report - though I'm not sure about this one), it should use the System Language.

Let me know if that works,

Kind Regards,

Etienne.

 

TorstenNeumann
Super Collector

Re: SQL Rules in multi-language (MLU) configuration

Thanks, Etienne! That was it.

I did not know that the user's session language would be the DB session language when rules were used.

//Add this to "OnDomLoad" event