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)

Remove quotes during file import

(0) ShareShare
ReportReport
Posted on by 625

Hi

I created a class to import data from a csv file. The data is text-based so I create a record container holding all single Values as string

Now the text file provided from Paypal look like this

""04.09.2019"",""EUR"",""-37"",""ARGSHRT453F"",...

How can I remove the second quotes around the values?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    Could we see your code that populates this container? The appropriate moment to remove the extra quotation marks would be before you put the values into the container.

    You can use strRem function to remove unwanted characters from your string variables.

  • CRSW Profile Picture
    625 on at

    while(importFile.status() == IO_Status::Ok)

    {

    recordContainer = importFile.read();

    importFile is an AsciiIo Object

  • Suggested answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    Here's an example where we remove quotes from string variables inside a container:

        container myCon1 = ['"foo"', '"bar"'];
        container myCon2;
        str myValue;
        int i;
       
        info(con2Str(myCon1));
        for (i = 0; i <= conLen(myCon1); i++)
        {
            myValue = conPeek(myCon1, i);
            myValue = strRem(myValue, '"');
            myCon2 += strRem(myValue, '"');
        }
       
        info(con2Str(myCon2));

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans