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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

String concatenation

(0) ShareShare
ReportReport
Posted on by

Hi Everyone,

I have to concatenate set of strings to make the AOT path as like @"\Classes\MeltingReportDP" so that i can pass this path in the below line

controllable = SysTreeNode::newTreeNodePath(@"\Classes\MeltingReportDP");

I am doing in this way..

str                     ObjectType,ObjectName,Path;

ObjectType = pngReleaseLines.ObjectType; \\ eg: classes
ObjectName = pngReleaseLines.ObjectName; \\ eg: MeltingReportDP
path = '\\'+ObjectType+'\\'+ObjectName;

controllable = SysTreeNode::newTreeNodePath(@path)

but it ends with error.

can anyone please help me this ? :)

Regards,

Pankaj Kumar

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    236,297 Most Valuable Professional on at
    RE: String concatenation

    If you need help with an error, it would help if you mentioned what error it is and where you're getting. Also, make sure debug your code - in debugger, you'll see clearly what value you have in the path variable.

    I don't see any problem in the concatenation, therefore I assume that your problem lies somewhere else.

  • Community Member Profile Picture
    on at
    RE: String concatenation

    Hi pankaj,

    What is the data type of ObjectType field. Is it string or enum? If it is enum then try enum2str conversion then concatenation.

    Regards

    Raghavender

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at
    RE: String concatenation

    path = strFmt(@'\%1\%2', objectType, objectName);

  • Don Shields Profile Picture
    650 on at
    RE: String concatenation

    I would recommend using strfmt() function to concatenate your strings. Something like:

    ObjectType= strfmt("\\%1\\%2",pngReleaseLines.objectType,pngReleaseLines.objectname);

    Regards,

    Don

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans