Use JS in formula??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saschavalentin
    Junior Member
    • Jan 2018
    • 14

    Use JS in formula??

    Is it possible to use Javascript in formula?

    I ask, because I have an multi-enum field and the count of the selected values must by multiplied with another field value. Could this be solved with the formula function??
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello,
    formula works only on backend side, where javascript is unavailable. It triggers before record saved. But if I understand you well, you can do what you want with formula-language

    Comment

    • saschavalentin
      Junior Member
      • Jan 2018
      • 14

      #3
      Hi Tanya,

      so would the syntax be "array\length(fieldname)"?

      Where fieldname is the name of the multi-enum field? But I only want to count the selected values.

      Comment

      • tanya
        Senior Member
        • Jun 2014
        • 4308

        #4
        It is a count of selected values

        For example a field name is test
        description=string\concatenate(array\length(test)* 3, '')
        Last edited by tanya; 02-16-2018, 09:13 AM.

        Comment

        • saschavalentin
          Junior Member
          • Jan 2018
          • 14

          #5
          Tried it and it works. I would be lost without you :-)
          Thanks!

          Comment

          Working...