Announcement

Collapse
No announcement yet.

formula concatenate

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

  • formula concatenate

    Hi,
    This definition does not work:

    name = string\concatenate('WvL VK-Chance ',account.name);

    The account name is not added. name contains only "WvL VK-Chance".

    What am I doing wrong?
    Peter

  • #2
    Formula for which one entity?
    Last edited by tanya; 03-14-2017, 09:02 AM.

    Comment


    • #3
      I have created a workflow that creates a task when saving a sales opportunity. The name of the task should be defined with formula.
      The atribut account.name can select with formula.

      Comment


      • #4
        Hi Peter,

        Try targetEntity\attribute('account.name')

        Comment


        • #5
          Hi Yuri,
          Many Thanks. It works.
          Sorry, I have not read this section in the workflow documentation.

          Comment


          • #6
            Hey yurikuzn it seems that above does not work when target entity is a custom Module - I'm trying to make a workflow that creates a task when certain field on a custom module is saved. For Instance:

            PHP Code:
            description=string\concatenate('This will show the content of a related module field ',targetEntity\attribute('relatedEntity.Attribute'

            Comment


            • tanya
              tanya commented
              Editing a comment
              Hello
              Check, if you formula is correct
              I use description=string\concatenate('This will show the content of a related module field ',targetEntity\attribute('createdBy.userName')); and it works for me. For two custom entities.
              If you can't figure it out, describe all process (your custom entity, relation, whole workflow rule info)
              Before check the log

          • #7
            Hey tanya thanks for above - I still not able to make this to work - attaching custom entity fields, relationships and workflow - Also I check the log file, all clear .. thanks
            Attached Files

            Comment


            • #8
              Is everything work, except description?
              Weird # symbol in the name.
              But, if everything works fine, when you delete description definition - attach your formula code, because I can not see the whole line

              Comment


              • #9
                Tanya, Yes, all other Task creation works(See pics) fine except the Description. As for the '#' is just a label in one of the Entity fields(See pic) Now, I'm using the field name not the label when using Formula, is that correct? Here is the code I'm using.

                PHP Code:
                description=string\concatenate('This Policy is on Cancellation Status ',targetEntity\attribute('Policy.name'));
                $end=datetime\format(targetEntity\attribute('createdAt'),'UTC','YYYY-MM-DD 10:00');
                $minutesDiff=datetime\diff(datetime\now(),datetime\format(datetime\now(),null,'YYYY-MM-DD HH:mm'),'minutes');
                $end=datetime\addMinutes($end$minutesDiff);
                dateEnd=$end
                By the way the descrition is also not showing the correct Date format --- Thanking you in advance Tanya!
                Attached Files

                Comment


                • #10
                  Code:
                  targetEntity\attribute('Policy.name')
                  Does you Task entity have link named 'Policy', or it is just 'parent'?
                  try
                  Code:
                  targetEntity\attribute('parent.name')
                  The format I used, is format for backend. If you set it for datetime field, system will show this field as usual, if you need it for text field, you need to use the function format

                  Comment

                  Working...
                  X