Formula field update on parent Entity

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • lazovic
    replied
    abhilash.kumar.niit,

    Please note that reports do not update records. They can only extract information in a structured manner.

    To update a record using a script and get calculated values, you need to update this record manually (change some field and save this change) or recalculate the formula in the List View (select the record and in Actions, select the Recalculate Formula function).

    Leave a comment:


  • abhilash.kumar.niit
    replied
    lazovic,

    Click image for larger version

Name:	image.png
Views:	284
Size:	44.1 KB
ID:	116514
    on updating the TM check Status the calculation of #of parameter should be updated.

    Leave a comment:


  • lazovic
    replied
    abhilash.kumar.niit,

    This formula script will update the field values in the parent entity with some calculated value (you should specify it in some variable) every time you update the child record in any way.

    You can give a specific example of how you want it to work, and we will definitely try to help you.

    Leave a comment:


  • abhilash.kumar.niit
    replied
    Hi, lazovic,

    Thanks for your help. I am a bit new to espo so i am little bit confused. the data is updating from the report filter on the fields not from the formula how can i implement the above using reports

    Leave a comment:


  • lazovic
    replied
    Hi abhilash.kumar.niit,

    Please use the following formula script for your child entity:
    Code:
    if (!entity\isNew()) {
        record\update(parentType, parentId,
                      'fieldName1', 'fieldValue1',
                      'fieldName2', 'fieldValue2'
                      )
    }
    Replace fieldName1 and fieldName2 with the names of the fields you want to change in the parent entity, and replace fieldValue1 and fieldValue2 with the values ​of those fields, respectively.

    Leave a comment:


  • abhilash.kumar.niit
    started a topic Formula field update on parent Entity

    Formula field update on parent Entity

    Hi i have 2 entities one is parent and another is child see below.

    now i have written a formula on some columns of parent entity to update when ever the child is updated and it is working fine but i need to edit and save the record after the change in child record. Can i trigger the parent formula fields on change of child columns.???

    Click image for larger version

Name:	image.png
Views:	647
Size:	143.5 KB
ID:	116004
Working...