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
September 6, 2023
Solved

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

  • September 6, 2023
  • 1 reply
  • 885 views

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.
Best answer by ParthaSarathy

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"/>

 

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
September 6, 2023

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
AshmeAuthor
September 6, 2023

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?

ParthaSarathy
Community Advisor
Community Advisor
September 6, 2023

@ashme ,

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