If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Localizing Static Values Lists for Views

When a field with a static value list is added to a view, the actual value of the field is displayed, not the localized value. To display the localized value in a view, you must create a virtual field on the top level entity to display localized values in a view. This is done by calculating the value of the virtual field with the SQL function fnGetLocalStringByCultureStringID to extract the culture strings associated with the values of the list.

The steps below provide an overview of how to create a virtual field to display localized values in a view:

  1. Open a new Fields record in the entity that includes the static combo box that you want to localize.
  2. Configure the necessary information in the top-area and on the field's General tab.
  3. Go to the Options tab and make sure the In Table option is cleared.
    • The Virtual Field tab is enabled.
       
  4. Go to the Virtual Field tab and select Calculated as the Virtual Field Type.
  5. Enter the appropriate syntax to display the static list values as localized. Below is an example of the syntax you can use where NameOfComboBoxField is replaced by the name of the field with the static value list and NameOfEntity is replaced by the name of the current entity.
    SELECT dbo.fnGetLocalStringByCultureStringID(
    (SELECT ISNULL(ValueCultureStringID,-1) 
    FROM dbo.vwEntityFieldValues ef 
    INNER JOIN dbo.vwEntities en ON ef.EntityID=en.ID 
    WHERE ef.Value=NameOfComboBoxField AND en.Name='NameOfEntity'), NameOfComboBoxField) 
     
  6. Select OK to close the Fields record.
  7. Save and close the entity.

Below is an example of a view that includes the value of a standard static list-based combo box (the Standard Combo Box field) and a localized virtual field (the Static Value field).

Localized Static Value List in a View

Copyright © 2014-2017 Aptify - Confidential and Proprietary