Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7741779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:06:55+00:00 2026-06-01T09:06:55+00:00

Working with regular javascript, I need to store info into an array for output

  • 0

Working with regular javascript, I need to store info into an array for output where Cust ID is the same. So the result data:

Tran ID         Name                               Cust ID          Brand          Tran Date
16446     |     Denton Bible Church      |     8381     |      Epson     |      8/27/2009
124751   |     Denton Bible Church      |     8381     |      Da-Lite    |     10/27/2010

My javascript to get column data:

for ( var z = 0; z < records.length; z++ ) {
        var result = records[z];
        var columns = result.getAllColumns();
        var column = columns[3];
        var brands = result.getValue(column);
        nlapiLogExecution('DEBUG','brands',brands);

        column = columns[2];
        var internalid = result.getValue(column);
        nlapiLogExecution('DEBUG','internalid',internalid);

        column = columns[4];
        var orderdate = result.getValue(column);
        nlapiLogExecution('DEBUG','orderdate',orderdate);

        var boresult = orderdate + "-" + brands;

        //The above would be inserted into the customer field for 1 customer

        //nlapiSetFieldValue('custentity28',brands + "-" + orderdate);
        nlapiSubmitField('customer', internalid, 'custentity28', boresult);
        nlapiLogExecution('DEBUG','enter','enter');
          }

I’m using API from my accounting software so the functions may not make sense. Anyway, so I need to know how to say: For every Cust ID that is the same, create an array and store in the following format:

8/27/2009 – Epson
10/27/2010 – Da-Lite

You can see I tried to do that with the boresult variable but I think that would only be pulling in the first line right?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:06:56+00:00Added an answer on June 1, 2026 at 9:06 am

    You probably should create an array outside the loop and just push items into it:

    var boresults = [];
    
    for (var z = 0; z < records.length; z++) {
    
        // Some code here...        
    
        var boresult = orderdate + "-" + brands;
        boresults.push(boresult);
    
        // Some other code...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some trouble translating my working C# regular expression into JavaScript's regular expression
I really need some help in Regular Expressions, i'm working on a function like
I'm using JavaScript to do some regular expression. Considering I'm working with well-formed source,
I'm working in JavaScript and I need to figure out how to determine a
I've been struggling with getting a working regular expression for a little project of
I am trying to get a working regular expression to convert standard HTML code
I working with some regular expression matching and I'm trying to figure out how
I am new to working with Spring on regular basis so I had a
We are working with a 3rd party PHP engine that gets regular updates. The
I am working on a piece of code which uses regular expressions in c.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.