Skip to main content

Attribute translation tables

Definition

Soffid provides an easy to use mechanism to translate references or external codes into internal codes. For example, the HHRR application could be using a diferent coding scheme for business units.

To deal with this data mismatch, users can extend the data model, or can either use translation tables. This screen allows the user to create and maintain such tables. This tables can also be downloaded or uploaded as CSV files, enable the import of data contained into spreadsheets.

Usage of translation table is bound, but not restricted to, attribute translation expressions,expressions, by using trigger scripts, through the use of serverService interface.

Before using the attribute translation tables, bear in mind that Soffid offers attribute expansion for some objects, or directly allows the creation of new custom objects with their own attribute definitions. Analyse which solution best suits your needs. Consult the metadata screen.

Screen overview

image.pngimage.png

Related objects

    • CustomMetadata objects:: custom objects are an alternative for storing and updating data
  • Custom scripts : page to test or use the attribute translation tables
  • Standard attributes

    • Domain: the domain column represents the translation table name.
    • Column 1: value
    • Column 2: value
    • Column 3: value
    • Column 4: value
    • Column 5: value

    Column 1 to 5 meaning is user defined. Usage of translation table is bound, but not restricted to, attribute translation expressions, through the use of serverService interface.

    Actions

    deleteoneby

    "Query search"

    Allows to query groups through different search systems, Quick, Basic and Advanced.

    Add new

    Allows you to add a new attribute translation table. That option adds a new row on the table to fill in the data. It will be mandatory to apply changes to save the data.

    Delete translation

    Allows you to remove one or more agentstranslations by selecting one or more records onand next clicking this button. To perform that action, Soffid will ask you for confirmation, you could confirm or cancel the list.operation.

    Or
    one.

    Download CSV file

    Allows you to download a CSV file with the information of all attribute translation tables.

    Import

    Allows you to upload a CSV file with the attribute translation table data to add to the system.

    First, you need to pick up a CSV file, that CSV has to contain a specific configuration. Then you need to check the contents. And finally, you need to select the mappings for each column of the CSV file to import the data correctly and to click the Import button.

    Download CSV fileUndo

    Allows you to downloadundo aany CSVchanges file with the information of all attribute translation tables.made.

    Apply changes

    Allows you to save new attribute translation tables or to save updated attribute translation tables.

    Undo

    Allows you to undo any changes made.

    Examples

    Example 1
    lCentros = serviceLocator.getAttributeTranslationService().findByColumn1("CENTROS", "Madrid");
    if (lCentros != null) {
        for (var i = 0; i < lCentros.length; i++) {
          if (lCentros[i] != null) {
          	out.println("** Centro - " + lCentros[i].column1 + " - "  + lCentros[i].column2 + " - " 
                        + lCentros[i].column3 + " - "  + lCentros[i].column4);
          }
        }
    }
    Example 2
    lServer = serviceLocator.getAttributeTranslationService().findByExample("SERVER_COPIAS", null, null);
    if (lServer != null) {
    	out.println("** SERVER_COPIAS - " + lServer);
    }
    Example 3
    // Rename translation tables
    
    void rename(String currentDomain, String newDomain) {
      lat = serviceLocator.getAttributeTranslationService().findByExample(currentDomain, null, null);
      for (at : lat) {
        at.domain = newDomain;
        serviceLocator.getAttributeTranslationService().update(at);
        out.println("Renamed: "+at.domain+", "+at.column1+", "+at.column2+", "+at.column3);
      }
    }
    
    rename("COUNTRY", "COUNTRY_COMPANY");
    rename("TEST", "TEST_COMMAND");

    Example 4
    lt = serviceLocator.getAttributeTranslationService().findByExample("COUNTRY", null, null);
    for (var i=0; i<lt.length; i++) {
      var t = lt.get(i);
      out.println(t.column1+" is "+t.column2+" or "+t.column3);
    }