web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Concatenate two or more fields into one field?

(1) ShareShare
ReportReport
Posted on by 45

Hi,

I have a question

There is a table contains two fields one is string and other is integer. Now i need to concatenate these two fields to one to get the third field. Is there any possibility in getting? how?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Zain Bokhari Profile Picture
    3,208 Moderator on at

    If you want to concatenate the fields through code you can do it in many ways,

    Like strfmt("%1%2", table.value1, table.value2 ); it will return a string with both values concatenated.

    Or str result = table.value1 + any2str(table.value2);

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Go one step back from Zain's post. There are multiple things to consider here.

    First of all, do you want to just show the field on a form without the requiremetns of searching/filtering?

    In that case you could write a display method on the Table, where you may use the code above to concatenate them, then add the display method on your form to just show the data.

    If you want to have the field physically in your database, then you need to change the metadata to add the new field, and then possibly an update job which populates it. If you want to maintain the value when any of the source fields change, you also need to do additional logic in the modifiedField/update methods.

    The third option would be to use a View with a computed column, where the data would again be filterable, and you could join this new view on your form to the original records.

    In any case, please contact your more experienced developers to work it out. Also you could use the search to find what to do in the MSDN documentation and blogs, since these are pretty basic/common tasks to do.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Pratik Bhosle Profile Picture

Pratik Bhosle 2

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans