Announcement

Collapse
No announcement yet.

EntityManager before save Formula

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • EntityManager before save Formula

    So, I'm trying to do a before save formula using the drop down on the right side of the entity manager. I'm trying to identify a multi-enumerator and depending on which one is selected, it should add text to a text field.
    Here is my code:
    ifThen(
    entity\isNew() && case.type == 'Option',
    case.description = 'Text to add to field.'
    );
    _____
    This does nothing. Nothing is ever added to any field and I don't even know where I can look to debug non working script.

  • #2
    Hello

    If you write formula for Cases

    try
    ifThen(entity\isNew() && type == 'Option', description = 'Text to add to field.');

    Comment


    • #3
      An ifThen or ifThenElse statement is format specific and all has to be on the same line? In the Calculated Fields (Formula) documentation the examples given are in the format I have above. I only ask because the only thing you changed, besides case.description to just description (which I did try) is just the format.

      Comment


      • #4
        Sorry, one more thing. If it does have to be on a single line, is there a way to format the text to append to the field via xml code or something else?
        ifThen(entity\isNew() && type == 'Option', description = 'Text to add to field.<br>Another line below.');

        Comment


        • #5
          No, text has not to be on the same line. If you need break a row, just press Enter button. And don't pay attention to highlighting

          Comment


          • #6
            I realized the issue was punctuation. Characters that cannot be between the ' content ' marks is at least, other apostrophes, quotation marks, and commas. Is there a list of do not use punctuation for this field?

            Comment

            Working...
            X