cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IsaiahA
Advocate III
Advocate III

Calculated Field in CDS

Hello,

I created a column in an Address entity to add 2 fields together. The fields are "FirstName" and "LastName". I called the calculated column as "FullName". In the formula window, I did the following: FirstName & " " & LastName, it says it is wrong. Then, I changed the columns to cr320_FirstName and did the same with LastName, and yet it is an error. I replace "&" with "+" sign, ditto. I would really appreciate any help. 

 

Thanks,

Isaiah A

2 ACCEPTED SOLUTIONS

Accepted Solutions

Actually the CONCAT function is listed in the "Calculated field functions syntax" section, found right below the DIFFINYEARS and above TRIMLEFT.

Here is the information from the link:
CONCAT (single line of text, single line of text, … single line of text)

Returns a string that is the result of concatenating two or more strings.

View solution in original post

v-siky-msft
Community Support
Community Support

Hi @IsaiahA ,

 

Please try this: 

Concat(firstname, " ", lastname)

 

Snipaste_2019-12-30_15-20-29.png

Sik

View solution in original post

7 REPLIES 7

@IsaiahA - Have you tried the CONCAT function in the calculated field's formula? Here is a reference page: https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/define-calcula...

Hello, 

Thanks for you response. There is no CONCAT function on that link. When it comes to calculating two numeric field, it was so straight forward like say: Column1 * Column 2

 

In the box that designated your formula, I was expecting something like: Column1 & " " & Column2. It is surprising to me that CDS would not give an example of how to concatenate two columns with a string. Hopefully, someone has created a calculated column in CDS that joins two fields together. 

 

Thanks,

Isaiah A. 

Actually the CONCAT function is listed in the "Calculated field functions syntax" section, found right below the DIFFINYEARS and above TRIMLEFT.

Here is the information from the link:
CONCAT (single line of text, single line of text, … single line of text)

Returns a string that is the result of concatenating two or more strings.

View solution in original post

I apologize for not including this screen shot:

CONCAT info from Microsoft DocsCONCAT info from Microsoft Docs

v-siky-msft
Community Support
Community Support

Hi @IsaiahA ,

 

Please try this: 

Concat(firstname, " ", lastname)

 

Snipaste_2019-12-30_15-20-29.png

Sik

View solution in original post

To those who have responded to my questions:

Dear All,

Thank you very much for responding to my questions. I will use the CONCAT function as described by you all.

Sincerely, 

Isaiah A. 

This approach doesn't seem to work for Lookup field.  I need to concatenate 3 look up field and 1 multiselect and cannot find anything online on such topic. 😞

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Kudoed Authors
Users online (59,730)