Topic
Updating a row’s field value using the Action Framework and merge syntax displays the value in the org’s default language instead of the user’s personal language.
When a user’s personal language is set to a language that differs from the org’s default primary language, updating a field on row via the Action Framework does not display translated values from the source field.
Problem Details
-
If a user’s personal primary language is set to something other than the org’s default primary language, this can result in translation issues can arise when using the Action Framework
- In this case, the translated values being used were from a multi-picklist. The picklist that was using its labels were used as the value to update a separate text field whenever changes were made to the picklist
- When the user made their picklist selections selects the values in their personal primary language, the text field would update with the org’s default primary language instead
Resolution
Use a snippet to update the merge fields with the translated values.
Resolution Process
-
Ensure that the translations for the fields were set up correctly in the Translation Workbench.
Check to make sure that labels:
- Has been created on the Skuid page.
- Run skuid.model.map() for a V1 page or skuid.debug.modelMap() for a V2 page, and noticed that the translated values were reflected in the actual data but not in the UI.
With the assistance of the dev team, it was discovered that this was in fact working as expected. When using the Action Framework to update rows, the data is passed in the org’s default language; in this case English. So a snippet:
- was used to update the fields using the translations instead:
var params = arguments[0],
$ = skuid.$;
var account = skuid.model.getModel('Account');
var newcase = skuid.model.getModel('UIO');
var row = account.getFirstRow();
var label = skuid.$L('Type');
newcase.updateRow({
additionalConditions:[
{field:'Type', value: label}
]
}); ```
The above snippet reads the translated values to access the labels, which are then used as the value in a Text component. A merge value similar to {{$Model.Account.data.0.Type}} was used in the action list to update the field with the correctly translated value.
Outcome
With the assistance of the dev team and adapting the provided snippet to the org in question, the translation issues via the action list were resolved.
Additional Information
Skuid will run and parse data in the org’s default language. If you are relying on this for updating translated info on your page you will need to use a snippet to accomplish your goals.
Get help with an issue
- Ask in the Skuid question forum.
- If you have a support entitlement, ask your question in Nintex Customer Central.