cancel
Showing results for 
Search instead for 
Did you mean: 

universe object that points to certain field according to the user PVL

Former Member
0 Kudos

Hi universe designing experts !

Marianne solved a problem I have in [this|; post. I wanted to replace an object/column in a report according to the users locale. This was done at report level with a selection containing the getPreferredViewingLanguage() function in WebI.

My question now is, could I somehow define in the universe an object that, according to the PVL of the report viewer, points to a different field in the database ?

We have description fields in the databse for different languages.

Thanks in advance !

P

Accepted Solutions (1)

Accepted Solutions (1)

MariannevL
Advisor
Advisor
0 Kudos

Hi again

If you want a solution for this written down, you need to give the database you use.

In Oracle there is a system view v$nls_parameters in which you can lookup stuff like that.

It's a one row view, so you can use a (select xxx from v$nls_parameters) as column in any query.

Given that, you can use case logic to determine which column is applicable.

case

when (select xxx from v$nls_parameters) = 'EN' then table.english description

when (select xxx from v$nls_parameters) = 'FR' then table.french description

else table.default description

end

or more oracle like

decode( (select xxx from v$nls_parameters) , 'EN', table.english description, 'FR' , table.french description,table.default description).

Other rdbms's have other ways of determining the locale...

So if you want more info, post which one you have.

Good luck,

Marianne

Former Member
0 Kudos

Hi,

1) How can i handle sublocales here like en_US or en_Uk.?

2) If it handles only parent locale then, Is there any common function which can be used across different data bases like for sql server and oracle.

Because i need to develop only single universe and that can be pointed to oracle or sql server in the customer side. But still want handle this situation of showing description based on the browser locale

3) if this is not possible at the universe level is there any way to handle it in the view level and pass the locale to the view and get the corresponding description

thanks in advance

Former Member
0 Kudos

Hi Marianne

Thanks again for your response.

> If you want a solution for this written down, you need to give the database you use.

We are using an Oracle 10g database.

> In Oracle there is a system view v$nls_parameters in which you can lookup stuff like that.

> It's a one row view, so you can use a (select xxx from v$nls_parameters) as column in any query.

OK I didn't know that. But I don't think that I could use this variable in this situation. Please correct me if I'm wrong...

What I want to do is this:

A user with Preferred Viewing Language nl_NL and a user with PVL en_GB are requesting the same report. In that report there is a field with a description about another field. The descriptions are 2 different columns in the database. You showed me before (thanks again) how I could switch the 2 field according to a users PVL that I could query from the system ( getPreferredViewingLanguage() ). I want, if possible, to do this at Universe level so I only have to drag 1 single object in the query that corresponds to the right column according to the report viewers PVL... So the en_GB guy will see English descriptions and the Dutch guy will see the Dutch descriptions all from the same object...

Would be cool if that was possible...

Thanks again for helping !

P

Former Member
0 Kudos

Hi

I think what we could do is keep the two descriptions in two different universe tables. Build a restriction in the universe ans map to another table for some specific users... The bad thing about that is that all users with a certain language have to be added manually to the restriction...

Or I could make new logical language groups...

Any other ideas ?

Thanks in advance !

P

Answers (0)