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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,715)