Announcement

Collapse
No announcement yet.

Differentiating variables with the same name in the function language

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

  • Differentiating variables with the same name in the function language

    Help and advice appreciated.

    I have a new entity type called Project hung off my Opportunity entity. The relationship is such that each Opportunity can have many Projects.

    In the script language within BPM I have created a new Project entity. This works fine. What I want to do is have the Project.name attribute have a calculated value which is derived from the Opportunity.Name.

    This is what I would like to do is something like the following (but I appreciate that this will not work):

    Code:
    Project.name = string\concatenate(Opportunity.name , '-Cash-Collection');

    How do i achieve this? I am sure that there is a function but I am not sure which one.

    Thanks in advance.

  • #2
    Hi,
    Please use 'name' instead of 'Project.name'. Could you provide screenshots with your BPM logic and configs? Perhaps for achieving your purposes, you need something from this scope https://github.com/espocrm/documenta...mula-functions.

    Comment


    • #3
      Thanks for the help, I now have this working. I had tried using
      Code:
      entity\attribute('name')
      which is described as "An ATTRIBUTE value of a target record." but this seemed to be the wrong target (it was the newly created record not the BPM Target record.

      I now have the code below which works perfectly; thanks for the help.

      Click image for larger version

Name:	Task Definition.png
Views:	78
Size:	37.1 KB
ID:	56126

      Comment


      • #4
        Originally posted by MatLudlam View Post
        Thanks for the help, I now have this working. I had tried using
        Code:
        entity\attribute('name')
        which is described as "An ATTRIBUTE value of a target record." but this seemed to be the wrong target (it was the newly created record not the BPM Target record.

        I now have the code below which works perfectly; thanks for the help.

        Click image for larger version

Name:	Task Definition.png
Views:	78
Size:	37.1 KB
ID:	56126
        This looks complicated than i thought please let me know any simple version.

        Comment

        Working...
        X