How do we sum two different object variable in the journey advance condition editor? | Community
Skip to main content
Level 2
August 23, 2024
Solved

How do we sum two different object variable in the journey advance condition editor?

  • August 23, 2024
  • 1 reply
  • 473 views

How do i do the sum of two different variable in two different object values like the below. 

 

sum(#{ExperiencePlatform.ProfileFieldGroup.profile._tenant.Trigger.Triggers.all(currentDataPackField.triggerName=="trg_0079_loan_promise" and currentDataPackField.numericAttribute01>=5000).numericAttribute01}, #{ExperiencePlatform.ProfileFieldGroup.profile._tenant.Trigger.Triggers.all(currentDataPackField.triggerName=="trg_0080_saving" and currentDataPackField.numericAttribute02>=5000).numericAttribute01})

 

This script is not working as expected. Same way it is not returning the value instead it is returning boolean value. 

 

Please give some suggestions

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mohan_Dugganab

If this is a condition activity, you can alter it on the following lines 

sum( sum(#{ExperiencePlatform.ProfileFieldGroup.profile._tenant.Trigger.Triggers.all(currentDataPackField.triggerName=="trg_0079_loan_promise" and currentDataPackField.numericAttribute01>=5000).numericAttribute01}) , sum(#{ExperiencePlatform.ProfileFieldGroup.profile._tenant.Trigger.Triggers.all(currentDataPackField.triggerName=="trg_0080_saving" and currentDataPackField.numericAttribute02>=5000).numericAttribute01}) ) > 0

1 reply

Mohan_Dugganab
Adobe Employee
Mohan_DugganabAdobe EmployeeAccepted solution
Adobe Employee
August 23, 2024

If this is a condition activity, you can alter it on the following lines 

sum( sum(#{ExperiencePlatform.ProfileFieldGroup.profile._tenant.Trigger.Triggers.all(currentDataPackField.triggerName=="trg_0079_loan_promise" and currentDataPackField.numericAttribute01>=5000).numericAttribute01}) , sum(#{ExperiencePlatform.ProfileFieldGroup.profile._tenant.Trigger.Triggers.all(currentDataPackField.triggerName=="trg_0080_saving" and currentDataPackField.numericAttribute02>=5000).numericAttribute01}) ) > 0