EntityManager before save Formula

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chris.petree
    Junior Member
    • Sep 2017
    • 5

    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.
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello

    If you write formula for Cases

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

    Comment

    • chris.petree
      Junior Member
      • Sep 2017
      • 5

      #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

      • chris.petree
        Junior Member
        • Sep 2017
        • 5

        #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

        • tanya
          Senior Member
          • Jun 2014
          • 4308

          #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

          • chris.petree
            Junior Member
            • Sep 2017
            • 5

            #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...