Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.
SOLVED

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

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

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