Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

what is FileName array?

Posted on by 20

Filename filepath_1;
Filename filename_1;
Filename fileType;
str fileNameString,fileNamePath;
//Mcs_RunSP sp = new Mcs_RunSP();
//#AviFiles
//#Define.Caption('SebTestProgress')
//#Define.Total(10)
//#Define.Wait(1000)
//SysOperationProgress sysOperationProgress;
;

filename = Mcs_ImportFilePOAcc.FileName;
fileNamePath=@filename;
[filepath_1, filename_1, fileType] = fileNameSplit(fileNamePath);
fileNameString= filename + fileType;

I am beginner in Microsoft Dynamics AX 2012 R3. I am facing some issue in above code. Can anyone tell me about this highlighted line means?

  • Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    RE: what is FileName array?

    It's not an array - it's a deconstruction of a container (see Containers in AX 2012 documentation).

    fileNameSplit() returns a container with three elements, and this syntax assings the first element to filepath_1 variable (declared above), the second element to filename_1 and the third to fileType.

    By the way, I've changed the category of this thread from Other to Development / Customization / SDK, because it clearly is about development.

    And I strongly recommend using Insert > Insert Code (in the rich-formatting view) for pasting source code.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans