How can I change an organization to multi-language and add languages through a web service?

Nick Tierney shared this question 5 years ago
Answered

Right now I am dynamically adding organizations/views/roles/users/translations through the web service api to simplify setup, but I cant seem to find a way to change an organization to be multi-language without updating the yellowfin configuration database and then restarting the app.

I saw this page https://community.yellowfinbi.com/knowledge-base/article/new-web-services-that-are-not-documented-as-of-yet and was wondering if LOADCONFIGURATION and SAVECONFIGURATION AdmistrationServices would be the equivalent of adding this parameter in settings? I tried hitting the web service but I'm not aware of the parameters I need to send to it to have it work.

Any help would be appreciated, thanks!

Replies (6)

photo
1

Hi Nick,

I suspect you may be right, but I've searched around and couldn't find any documentation on those functions for the moment.

I also tried using the web services function called METADATASQLQUERY to update the Configuration table with the following query:

 rsr.setQuery("UPDATE Configuration SET ConfigData = 'true' WHERE ConfigTypeCode = 'SYSTEM' AND ConfigCode = 'MULTILANGUAGE'");

but unfortunately I found that the next time the user logged in after making those changes, then Yellowfin overwrote those new changes in the database with the old data that was still in the local cache for the Configuration table. Interestingly, if I updated a different table such as the PersonConfiguration table to change the default Browse screen from Thumbnails to List with the following query:

rsr.setQuery("UPDATE PersonConfiguration SET ConfigData = 'LIST' WHERE ConfigTypeCode = 'USERCONFIG' AND ConfigCode = 'REPORTLISTVIEW'");
then that was successful, i.e. the new changes made to the PersonConfiguration table were not overwritten by the local cache values.

I will pursue the LOADCONFIGURATION and SAVECONFIGURATION functions tomorrow.

regards

David

photo
1

Hi Nick,

good news, at the 11th hour (i.e. it's home time now) I was able to use those LOAD and SAVE CONIFGURATION functions by finding and reading the source code.

So I've attached them here for you (they've got a .XXX extension to avoid the mail security)

regards,

David

photo
2

Hi Nick,

just had another look into this and saw the parameters in the jsp were wrong (see what happens when you're rushing late on a Friday afternoon!), the 1st param represents the ConfigCode and it should be "MULTILANGUAGE" , and the 2nd one is the ConfigData which of course should be "TRUE", but having said that, they still don't seem to be updating the application cache.

Will continue investigating this and keep you updated...

regards,

David

photo
2

Hi Nick,

well, after all that it turns out there is a special web service for refreshing configuration codes, please look at the RELOADCODES function in the following wiki article:

http://wiki.yellowfin.com.au/display/USER74/Cache+Management+Services

And as well as that, I've written a JSP (attached) which does the same job but without web services, just in case you'd prefer that.

regards,

David

photo
1

Amazing help Dave, thanks so much!

Here are a few amendments to your comments that I had to make to get it working:

  1. Normally a web service request will perform its operation on the Client Organization if you just set the AdministrationServiceRequest.orgRef parameter, this didn't work for the SAVECONFIGURATION function. When doing this request you must use the AdministrationServiceRequest.client property in the request, or else it will default to the default org(1).
  2. The ConfigCode property for 'MULTILANGUAGE' should be set to 'true' and not 'TRUE', or else the ui doesn't reflect the change in yellowfin.

photo
1

Hi Nick,

glad to be of help, and I must return the thanks to you as well for those 2 amendments, I have tested them out and you are exactly right!

So thanks very much for sharing the knowledge, I'm sure there will be future users who will be grateful when they come across this information this Question.

regards,

David

Leave a Comment
 
Attach a file