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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Unanswered

How To Concatenate Strings

(0) ShareShare
ReportReport
Posted on by

Hi all,

Please Find my code below where I am trying to Insert a value into the table Field.

I am trying to concatenate StringEdit Control with "139"   using (+) Operator,  when I compiile it is not showing me any error but it is not getting combined .

kAcc.AccountNum = HeaderTitle.valueStr()+"139";

For EX :

If AccountNum is (000379_)  then I want it to get concatenated with "139"

So that the AccountNum could become as ( 000379_139)

Please help,

regards ,

Nishath Salman 

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Nishath,

    What is the exact current behavior? Is it returning only the StringEdit control or something else?

    You can try to use the strFmt() function like:

    kAcc.AccountNum = strFmt("%1%2",HeaderTitle.valueStr(),"139");

  • Community Member Profile Picture
    on at

    Hi Andre ,

    Thank You For Replying.

    I have used what you have suggested but still it's not working.

    Lets say My string Control ("HeaderTitle.valueStr()" is having value (000378_) )

    when I compile ( kAcc.AccountNum = strFmt("%1%2",HeaderTitle.valueStr(),"139");  )

    I want the AccountNum to be concatenated as ( 000378_139 ) .

    Now when I tried using what you just have suggested ,  still it is throwing just ( 000378_) .

    "139"  is not getting concatenated.

    Regards,

    Nishath Salman N

  • XB Profile Picture
    1,875 on at

    Be careful with the length of AccountNum, if you try to concatenate more than length of accountnum this will be truncate.

  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    I have done a simple test, but your initial method and my suggestion should work. Can you share the complete code of this method? Possibly somewhere a value might be reset/overwritten.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans