Business Process - calculated sum not modifying invoice record

Hello all,

I am currently trying to update the standard Invoice object record's field; "payment amount" with a calculated sum collected from a custom object called: "Payments" from it's "Amount" field.

-Payments Record Added has the filter conditions of, "Amount is filled in"
- Payments Record Deleted has no filters
- Payments Record Modified has the, "Changes expected in any selected fields = 'Amount'"
 

 

 


 


And this is the current Invoice Record:

 

The Payment Amount field AND the test payment amount field I created show no input despite refreshes and alterations. I would appreciate any suggestions on my wrongdoings, as this is a more fundamental business process I have used before.

Thank you in advance for any help you can provide.

Like 0

Like

4 comments

Additionally, I found that the "read data" element is not actually picking up the invoice. Below is the trace data of the process log:


{
    "Element parameters": [
        {
            "Parameter": "Data source of filters",
            "Value": {
                "Before execution": "{\"className\":\"Terrasoft.FilterGroup\",\"serializedFilterEditData\":\"{\\\"className\\\":\\\"Terrasoft.FilterGroup\\\",\\\"items\\\":{\\\"e9bc0ff2-a863-446d-8673-b7c8a71ae2c3\\\":{\\\"className\\\":\\\"Terrasoft.CompareFilter\\\",\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"className\\\":\\\"Terrasoft.ColumnExpression\\\",\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"Id\\\"},\\\"isAggregative\\\":false,\\\"key\\\":\\\"e9bc0ff2-a863-446d-8673-b7c8a71ae2c3\\\",\\\"dataValueType\\\":0,\\\"leftExpressionCaption\\\":\\\"Id\\\",\\\"rightExpression\\\":{\\\"className\\\":\\\"Terrasoft.ParameterExpression\\\",\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"className\\\":\\\"Terrasoft.Parameter\\\",\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Element:{293bb23f-d16f-4c7a-ad45-9499a22ce47c}].[Parameter:{86b49173-d922-4022-b289-93b2acf6e683}]\\\",\\\"displayValue\\\":\\\"Payments Record Added.Unique identifier of record\\\"}}}},\\\"704c93a5-e747-4fcf-86b6-b14f1398ffe0\\\":{\\\"className\\\":\\\"Terrasoft.CompareFilter\\\",\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"className\\\":\\\"Terrasoft.ColumnExpression\\\",\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"Id\\\"},\\\"isAggregative\\\":false,\\\"key\\\":\\\"704c93a5-e747-4fcf-86b6-b14f1398ffe0\\\",\\\"dataValueType\\\":0,\\\"leftExpressionCaption\\\":\\\"Id\\\",\\\"rightExpression\\\":{\\\"className\\\":\\\"Terrasoft.ParameterExpression\\\",\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"className\\\":\\\"Terrasoft.Parameter\\\",\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Element:{32a3cb4b-4109-4978-84ae-e4f236ffddc6}].[Parameter:{a8f68505-7f8e-4e33-ac3d-3c9116eb1915}]\\\",\\\"displayValue\\\":\\\"Payments Record Deleted.Unique identifier of record\\\"}}}},\\\"d3db370d-afe3-49c5-a121-571f02715f64\\\":{\\\"className\\\":\\\"Terrasoft.CompareFilter\\\",\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"className\\\":\\\"Terrasoft.ColumnExpression\\\",\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"Id\\\"},\\\"isAggregative\\\":false,\\\"key\\\":\\\"d3db370d-afe3-49c5-a121-571f02715f64\\\",\\\"dataValueType\\\":0,\\\"leftExpressionCaption\\\":\\\"Id\\\",\\\"rightExpression\\\":{\\\"className\\\":\\\"Terrasoft.ParameterExpression\\\",\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"className\\\":\\\"Terrasoft.Parameter\\\",\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Element:{335bd2a9-757f-4750-adb1-a6d1a23e05f1}].[Parameter:{c6326280-12ce-424f-830a-9659100f8272}]\\\",\\\"displayValue\\\":\\\"Payments Record Modified.Unique identifier of record\\\"}}}}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"IWPayments\\\",\\\"key\\\":\\\"\\\"}\",\"dataSourceFilters\":\"{\\\"items\\\":{\\\"e9bc0ff2-a863-446d-8673-b7c8a71ae2c3\\\":{\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"Id\\\"},\\\"rightExpression\\\":{\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Element:{293bb23f-d16f-4c7a-ad45-9499a22ce47c}].[Parameter:{86b49173-d922-4022-b289-93b2acf6e683}]\\\"}}}},\\\"704c93a5-e747-4fcf-86b6-b14f1398ffe0\\\":{\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"Id\\\"},\\\"rightExpression\\\":{\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Element:{32a3cb4b-4109-4978-84ae-e4f236ffddc6}].[Parameter:{a8f68505-7f8e-4e33-ac3d-3c9116eb1915}]\\\"}}}},\\\"d3db370d-afe3-49c5-a121-571f02715f64\\\":{\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"Id\\\"},\\\"rightExpression\\\":{\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Element:{335bd2a9-757f-4750-adb1-a6d1a23e05f1}].[Parameter:{c6326280-12ce-424f-830a-9659100f8272}]\\\"}}}}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"IWPayments\\\"}\"}",
                "After execution": "{\"className\":\"Terrasoft.FilterGroup\",\"serializedFilterEditData\":\"{\\\"className\\\":\\\"Terrasoft.FilterGroup\\\",\\\"items\\\":{\\\"e9bc0ff2-a863-446d-8673-b7c8a71ae2c3\\\":{\\\"className\\\":\\\"Terrasoft.CompareFilter\\\",\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"className\\\":\\\"Terrasoft.ColumnExpression\\\",\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"Id\\\"},\\\"isAggregative\\\":false,\\\"key\\\":\\\"e9bc0ff2-a863-446d-8673-b7c8a71ae2c3\\\",\\\"dataValueType\\\":0,\\\"leftExpressionCaption\\\":\\\"Id\\\",\\\"rightExpression\\\":{\\\"className\\\":\\\"Terrasoft.ParameterExpression\\\",\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"className\\\":\\\"Terrasoft.Parameter\\\",\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Element:{293bb23f-d16f-4c7a-ad45-9499a22ce47c}].[Parameter:{86b49173-d922-4022-b289-93b2acf6e683}]\\\",\\\"displayValue\\\":\\\"Payments Record Added.Unique identifier of record\\\"}}}},\\\"704c93a5-e747-4fcf-86b6-b14f1398ffe0\\\":{\\\"className\\\":\\\"Terrasoft.CompareFilter\\\",\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"className\\\":\\\"Terrasoft.ColumnExpression\\\",\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"Id\\\"},\\\"isAggregative\\\":false,\\\"key\\\":\\\"704c93a5-e747-4fcf-86b6-b14f1398ffe0\\\",\\\"dataValueType\\\":0,\\\"leftExpressionCaption\\\":\\\"Id\\\",\\\"rightExpression\\\":{\\\"className\\\":\\\"Terrasoft.ParameterExpression\\\",\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"className\\\":\\\"Terrasoft.Parameter\\\",\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Element:{32a3cb4b-4109-4978-84ae-e4f236ffddc6}].[Parameter:{a8f68505-7f8e-4e33-ac3d-3c9116eb1915}]\\\",\\\"displayValue\\\":\\\"Payments Record Deleted.Unique identifier of record\\\"}}}},\\\"d3db370d-afe3-49c5-a121-571f02715f64\\\":{\\\"className\\\":\\\"Terrasoft.CompareFilter\\\",\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"className\\\":\\\"Terrasoft.ColumnExpression\\\",\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"Id\\\"},\\\"isAggregative\\\":false,\\\"key\\\":\\\"d3db370d-afe3-49c5-a121-571f02715f64\\\",\\\"dataValueType\\\":0,\\\"leftExpressionCaption\\\":\\\"Id\\\",\\\"rightExpression\\\":{\\\"className\\\":\\\"Terrasoft.ParameterExpression\\\",\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"className\\\":\\\"Terrasoft.Parameter\\\",\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Element:{335bd2a9-757f-4750-adb1-a6d1a23e05f1}].[Parameter:{c6326280-12ce-424f-830a-9659100f8272}]\\\",\\\"displayValue\\\":\\\"Payments Record Modified.Unique identifier of record\\\"}}}}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"IWPayments\\\",\\\"key\\\":\\\"\\\"}\",\"dataSourceFilters\":\"{\\\"items\\\":{\\\"e9bc0ff2-a863-446d-8673-b7c8a71ae2c3\\\":{\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"Id\\\"},\\\"rightExpression\\\":{\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Element:{293bb23f-d16f-4c7a-ad45-9499a22ce47c}].[Parameter:{86b49173-d922-4022-b289-93b2acf6e683}]\\\"}}}},\\\"704c93a5-e747-4fcf-86b6-b14f1398ffe0\\\":{\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"Id\\\"},\\\"rightExpression\\\":{\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Element:{32a3cb4b-4109-4978-84ae-e4f236ffddc6}].[Parameter:{a8f68505-7f8e-4e33-ac3d-3c9116eb1915}]\\\"}}}},\\\"d3db370d-afe3-49c5-a121-571f02715f64\\\":{\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"Id\\\"},\\\"rightExpression\\\":{\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Element:{335bd2a9-757f-4750-adb1-a6d1a23e05f1}].[Parameter:{c6326280-12ce-424f-830a-9659100f8272}]\\\"}}}}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"IWPayments\\\"}\"}"
            }
        },
        {
            "Parameter": "Read first",
            "Value": {
                "Before execution": true,
                "After execution": true
            }
        },
        {
            "Parameter": "Columns order",
            "Value": {
                "Before execution": "",
                "After execution": ""
            }
        },
        {
            "Parameter": "First item of resulting collection",
            "Value": {
                "Before execution": {},
                "After execution": {}
            }
        },
        {
            "Parameter": "Read uncommitted data",
            "Value": {
                "Before execution": true,
                "After execution": true
            }
        },
        {
            "Parameter": "Consider time in the filter",
            "Value": {
                "Before execution": true,
                "After execution": true
            }
        }
    ],
    "Process parameters": [
        {
            "Parameter": "IWPayments Amount",
            "Value": {
                "Before execution": 0,
                "After execution": 0
            }
        }
    ]
}

In the first read where you use the Id values from the start signals, change the AND to OR (if you click the AND it will toggle it to OR).

Ryan

Ryan Farley,

Thank you Ryan. I must have overlooked that detail while reviewing other work! I am now having a new issue where the calculation element shows an incorrect sum.

For instance, when setting the Calculate Element to, "OR" I will have one record with an amount of $4500. When modified, it will then show a sum of $94,500.

But if I set it to, "AND", then the Calculate Element will show $0 for both the input and output.

Any idea on what could be causing this?

 

I am going to answer my own question here for my reply, as I discovered that my filters were not working correctly and the calculated sum was adding ALL records of the Payments object:

 

I found that for the "Calculate Element" filters, not only did I not need the 

 

"id ≠ Payments.Record Deleted.Unique identifier of record" 

 

But that the filter of:

 

"Invoice = Read Invoice from IWPayments.First item of resulting collection.Invoice"

 

Should be:

 

"Invoice.Id = Read Invoice from IWPayments.First item of resulting collection.Invoice"

 

I thought I had set it to that already, but I must have overlooked it while troubleshooting other solutions. 

Thank you to anyone who took a look at this!

Show all comments