- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2023 05:13 AM
Hi,
I have translated all choices in Chinese language. In record producer, I am referring choice table for a variable choice (variable type - lookup select box) but on the Employee Service Center both English and Chinese choices are coming in the field.
But when I am looking in table view and creating new record only Chinese are showing.
Don't know why this is happening, is there any restriction on platform and portal view?
PFA snap for the same.
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2023 06:36 PM
That (Priority working) is be because that Select Box variable is configured to "copy" the choices from a table field configured with choices.
However as far as I can tell, you need to filter choices based on what is selected in another variable/question (Case type).
That is only possible using reference qualifier.
Adding the language filter should be working for you - I can successfully reproduce it/make it work.
However the reference qualifier must start with keyword/token javascript: - this being the case is not obvious from what you have posted.
Like below:
javascript: 'name=sn_spend_psd_procurement_request^element=u_type^dependent_value=' + current.variables.case_type + '^language=' + gs.getUser().getLanguage();
Also you must add a variable attribute to the Lookup Select Box:
ref_qual_elements=case_type
Otherwise the reference qualifier is only applied on load.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2023 08:46 AM
make sure all the choices have the correct "values" and languages set against them and you might need to do a cache.do as well,
Generally, when testing other languages it's best to use different users (pre-set) in different browsers as it reduces the cache'ing issue in testing,
Many thanks,
Kind regards
Director of Globalization Deployment, Internationalization
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2023 02:23 AM
Hi @Alex Coope - SN ,
I have tried with the different user in different browser but still same issue. Even when I am selecting Chinese choice label in dropdown then English label is coming after selection.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2023 02:46 PM
JavaScript is case sensitive.
So if the ref. qual. is exactly what you typed, it is not correct.
gs.getUser() returns an object that has no method called getlanguage, but one called getLanguage.
But even that might not be the (only) problem; judging by the table name, you might be working in a scope and getLanguage is not available in scopes.
So if that is the case - you are working in a scope, you need to create a Script Include in global (scope) that returns the current user's language and call that in the reference qualifier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2023 06:50 AM
Could you let us know the exact reference qualifier and in which application scope is the Catalog Item/Record Producer created?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2023 07:36 AM
Hi @-O- ,
Record producer is created in Global. Currently I am using below reference qualifier. I didn't add language filter in the qualifier.
javascript: 'name=sn_spend_psd_procurement_request^element=u_type^dependent_value='+current.variables.case_type;
There is one OOB record producer "create incident", in which a select box type variable "urgency" is there. This variable also referring choice table and choices are showing as per language selected. But in my case don't know why it is not working.