Changing date field format, process models names become question marks

Certified Associate Developer

Hello I am trying to change the format of the displayed date in the date field. Currently it is mm/dd/yyyy. I found a solution in admin console -> internationalization. It changes the format if I pick locale to en_UK, however then process model names and descriptions become three question marks "???". How to fix this or maybe there is another way to do this date formatting? I am on Appian 23.3

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    By default, Appian localizes the format of dates and numbers based on your user locale.

    If you need to display things in a different way, you can use the text() function.

    Keep in mind that users might expect to get "their" formatting so overwriting the default can become an issue.

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    a!dateField(
      label: "Start Date",
      labelPosition: "ABOVE",
      value: ri!date,
      saveInto: ri!date
    )


    This is the code I am talking about. If I set the (display) value to text(ri!date, "dd/mm/yyyy") it doesn't work and it's not saving to ri!date.
    Why is it a problem if I change the user locale? Let's say I need to test how things will look for different locales, that should be possible right?

  • 0
    Certified Lead Developer
    in reply to erazemk6135

    The date field cannot be customized in how is accepts and formats the date.

    If you need/want to display a date, outside the date field in a different formatting, it can become confusing for the user.

    But, whether all of this is a problem or not, in your situation, I cannot say.

    BTW, you do not need to go to the admin console to change the locale of your specific user. That's done in the user settings.

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    I agree that to display a date outside the date field is bad UX and that is not an option for me. I changed my user locale and it worked. However, this would mean that all the users have to change their own locale manually? I want it to be pre-set to this locale because I don't want them to have to control this aspect of the application. I still do not understand why process models become question marks.

  • 0
    Certified Lead Developer
    in reply to erazemk6135

    User locale is a per-platform setting, not a per-application setting. If you want, you can limit the locale to just one.

    Process models are created with the locale the designer has at the time of creation. If you disable that locale later, the model has no text strings for that new locale and show question marks.

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    Ok so correct me if I am wrong: I need to set the locale at the beginning of the application development. I can't change the locale of the models now. I did not disable the original locale, I just changed the primary locale but this somehow doesn't keep the old locale as available to the process models even though it is included in the enabled locales.

    I have one final question to understand this locale thing:
    Let's say I develop my application on platform with locale A. Then I export this application to a production platform with locale B. This will mangle all process models names am I correct?

  • +1
    Certified Lead Developer
    in reply to erazemk6135

    Models do not have a locale, but rely on the enabled locales and the standard locale as defined in the admin console. In the model designer, you will see the locale of your account. When you add nodes, it will only populate the node name etc. in your locale. But you can switch to other locales in the node properties and enter these values.

    Deploying to an environment with a different language setup can lead to issues.

    As a baseline, I try to define EN_US as the default language and make all developers use this locale. Any additional language or localization can be enabled and if I do not enter the translated values, EN_US will be the fallback.

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    I understand now, thank you. The nodes seem to correctly fall back to the US locale name when the GB name is empty, even though I have GB enabled. This does not happen for process names as they appear in designer as question marks or empty. I solved this by manually going through each process and basically copying process names etc. from US to GB in the project properties. Luckily this was only 20 process models or so.

Reply
  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    I understand now, thank you. The nodes seem to correctly fall back to the US locale name when the GB name is empty, even though I have GB enabled. This does not happen for process names as they appear in designer as question marks or empty. I solved this by manually going through each process and basically copying process names etc. from US to GB in the project properties. Luckily this was only 20 process models or so.

Children
No Data