Using formula to set field value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • limitless
    Member
    • Nov 2019
    • 33

    Using formula to set field value

    Im trying to understand how to set a field value.. going to formula i try the following to set the address field value :
    Contact\'addressStreet' = 'test';

    can someone help me with the correct syntax please ?
    Thank you in advance.


  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Hello,
    you just need to write this in formula:
    Code:
    addressStreet = 'test'

    Comment

    • limitless
      Member
      • Nov 2019
      • 33

      #3
      Thank you for the reply Maximus - Much appreciated.
      And again - sorry for the simple questions, but there is no knowledge documents found anywhere to learn this stuff :/

      Comment

      • limitless
        Member
        • Nov 2019
        • 33

        #4
        Sorry to say that the addressStreet = 'test' Didnt work :/ tired addressStreet = 'test'; - tried addressStreet = "test" and also addressStreet = '"test"; --> none of these systex variation worked - the field value stays on none (or on the value it was set before if set) and does not change with the formula code as expected.
        Any advice would be appreciated (im working on the trail server from espocrm itself)

        Comment

        • limitless
          Member
          • Nov 2019
          • 33

          #5
          Ho! It works when creating a new contact!! , i was expecting it to fire every time it loads a record but i guess its only for new items created..

          Comment

          • Nishan Perera
            Active Community Member
            • Jan 2019
            • 348

            #6
            Hi,

            For existing contacts you can do "Recalculate formula" with selecting the contact records that you want to update.
            Cheers!
            Nishan.

            Comment

            • Maximus
              Senior Member
              • Nov 2018
              • 2731

              #7
              > but there is no knowledge documents found anywhere to learn this stuff :/
              Here is the formula documentation https://github.com/espocrm/documenta...ion/formula.md.

              Comment

              • limitless
                Member
                • Nov 2019
                • 33

                #8
                Thank you both - very helpful!

                Comment

                Working...