Formula and validation question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yberges
    Senior Member
    • Jul 2022
    • 174

    Formula and validation question

    hello
    i need to understand 2 things with field and validation
    1 i create a profil and i want to set Name in uppercase after save
    how i can do this with formula ? i edite my profil identity, go to formula but i don't understand how i can set Name to uppercas

    2 in a phone field how i can do a mask for value ?
    thanks for your help
  • lazovic
    Super Moderator
    • Jan 2022
    • 809

    #2
    Hi yberges,

    You can set Name field's value in uppercase after save using this formula: https://docs.espocrm.com/administrat...tringuppercase.

    Comment

    • yberges
      Senior Member
      • Jul 2022
      • 174

      #3
      yes i see this but i am not a dev ... i need to understand how i can add this in formula and apply to a specific field
      thanks

      Comment

    • lazovic
      Super Moderator
      • Jan 2022
      • 809

      #4
      yberges,

      Go to Administration > Entity Manager > Profil (your entity) > Formula and insert this line:
      Code:
      name = string\upperCase(name);

      Comment

      • yberges
        Senior Member
        • Jul 2022
        • 174

        #5
        ahh maybe i don't undesratnd but
        1 i add formula
        2 i edit an value and save
        3 i see NAME LASTNAME in title of view
        Click image for larger version

Name:	2022-11-24_13h52_45.png
Views:	324
Size:	77.9 KB
ID:	85625
        4 i refresh all become without formula
        Click image for larger version

Name:	2022-11-24_13h52_59.png
Views:	359
Size:	76.4 KB
ID:	85624
        any idea ?

        other question how i can do a number mask in input ?
        regards

        Comment


        • esforim
          esforim commented
          Editing a comment
          "number mask in input"

          Can't without code. It in feature request but no update yet. If you want it urgently there is a Paid Extension for it.

          Unfortunately there is also no guide on how to do it as well.
      • item
        Active Community Member
        • Mar 2017
        • 1476

        #6
        Salut,
        Ton entity Profil est de type : Person ? ce qui semble etre le cas :
        "name" c'est une concatenation de "firstName" et "lastName". ce n'est pas comme les autre entityType où l'on a reellement un attribut "name"

        dans ton cas :

        firstName = string\upperCase(firstName);
        lastName = string\upperCase(lastName);

        Pour les mask Input, on a pas de solution et generalement ca pose probleme a l'usage (en tout cas, dans notre entreprise)
        If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

        Comment

        • yberges
          Senior Member
          • Jul 2022
          • 174

          #7
          yes genial ca marche !!!!!!!!! merci item (super cool de trouver des utilisateur FR)

          Comment

          Working...