Can we create calculated field in ACC using any three attribute with same data type (ex. floating numbers) while creating the schema? | Community
Skip to main content
New Participant
Sep 6, 2023 11:19 AM UTC
Solved

Can we create calculated field in ACC using any three attribute with same data type (ex. floating numbers) while creating the schema?

Can we create calculated field in ACC using any three attribute with same data type (ex. floating numbers) while creating the schema?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ParthaSarathy
ParthaSarathyAccepted solution
New Participant
Sep 6, 2023 11:35 AM UTC

Hi @ashme ,

Yes, You can create.

For example, If you have 3 attributes (@float1, @float2 and @float3) with data type as 'double' (floating), and if you want to create a calculated field by adding these 3 attributes, you can create a new attribute in the schema as below

<attribute label="float1" name="float1" type="double"/> <attribute label="float2" name="float2" type="double"/> <attribute label="float3" name="float3" type="double"/> <attribute expr="@float1+@float2+@float3" label="Calculated Field" name="exprDouble" type="double"/>

 

 ~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups

3 replies

ParthaSarathy
ParthaSarathyAccepted solution
New Participant
Sep 6, 2023 11:35 AM UTC

Hi @ashme ,

Yes, You can create.

For example, If you have 3 attributes (@float1, @float2 and @float3) with data type as 'double' (floating), and if you want to create a calculated field by adding these 3 attributes, you can create a new attribute in the schema as below

<attribute label="float1" name="float1" type="double"/> <attribute label="float2" name="float2" type="double"/> <attribute label="float3" name="float3" type="double"/> <attribute expr="@float1+@float2+@float3" label="Calculated Field" name="exprDouble" type="double"/>

 

Translate
 ~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
AshmeAuthor
New Participant
Sep 6, 2023 11:46 AM UTC

Hi @parthasarathy ,

 

Thank you for your response. Let me check if it is working fine.

 

Also, What "expr" to use if we have to subtract the fourth attribute?

Translate
ParthaSarathy
New Participant
Sep 6, 2023 12:24 PM UTC

@ashme ,

<attribute expr="@float1+@float2+@float3-@float4" label="Calculated Field" name="exprDouble" type="double"/>
Translate
 ~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups