Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Container conversion

(0) ShareShare
ReportReport
Posted on by 932

I convert a container to str using conv2str, the method return a str like this :25,30,40,...

But I want to place the values vertically:

25

30

40

...

there is any suggestion?

*This post is locked for comments

  • BASMA Profile Picture
    932 on at
    RE: Container conversion

    ok

  • Martin Dráb Profile Picture
    233,710 Most Valuable Professional on at
    RE: Container conversion

    Aha, I thought you already knew that. I should have asked for your actual code when you didn't provide it by yourself. Try giving us all details next time.

  • Verified answer
    BASMA Profile Picture
    932 on at
    RE: Container conversion

    Hi Martin,


    I found a solution : 

    I convert the container into str using con2Str like this : con2Str(MyContainer,"\n");

  • Suggested answer
    Martin Dráb Profile Picture
    233,710 Most Valuable Professional on at
    RE: Container conversion

    Think again whether you can't simply have several lines in the grid. If not, make sure you set Multiline property of the string control.

    Note that I don't see any reason for using containers in this solution. Avoid them if they're not necessary, working with them in unnecessarily error-prone.

  • BASMA Profile Picture
    932 on at
    RE: Container conversion

    Hi Martin, Thanks for your reply

    4188.string.png

    every item in sales line has many lengths like the image.

    I develop a display method that returns a container of length but when I run the code I don't get any thing.

    so I convert container to str when I run code I get values placed horizontally.

    I want to place it vertically.
  • Martin Dráb Profile Picture
    233,710 Most Valuable Professional on at
    RE: Container conversion

    Please tell us where you want "to place" these values. In a report? In a form? Or somewhere else?

    Note that you probably shouldn't convert values to a string in the first place. For example, you could put values to a temporary table and put them to a form grid or table on a report.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
Zain Mehmood Profile Picture

Zain Mehmood 6 Moderator

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans