Differentiating variables with the same name in the function language

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Mar555y
    replied
    Originally posted by MatLudlam
    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:	151
Size:	37.1 KB
ID:	56126
    This looks complicated than i thought please let me know any simple version.

    Leave a comment:


  • MatLudlam
    replied
    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:	151
Size:	37.1 KB
ID:	56126

    Leave a comment:


  • Maximus
    replied
    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.

    Leave a comment:


  • 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.
Working...