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 9056833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:18:12+00:00 2026-06-16T14:18:12+00:00

This pertains within a BPM application called ProcessMaker but the logic and syntax should

  • 0

This pertains within a BPM application called ProcessMaker but the logic and syntax should relatively be the same. I’m trying to
populate a grid (basically a table) from another serialized grid where the data has been passed to a hidden field.

The data passed to the hidden field is formatted as follows:

Ex:

{"1":{"id":"4332","product":"ball","price":"$5.00",”ordered":"On"}

The javascript example below found on processmaker’s wiki unserializes the hidden field as an object and uses its information to populate a new grid named whatever it is. The example on processmaker’s wiki uses the eval function but how would you convert this using the json.parse() function?

        function populateGrid() {
           var grd = getObject("newAccountsGrid");
           //remove all existing rows in the grid (except the first one): 
           var i = Number_Rows_Grid("newAccountsGrid", "accId");
           for (; i > 1; i--)
              grd.deleteGridRow(i, true);
           //The first row can't be deleted, so clear the fields in the first row:
           for (i = 0; i < grd.aFields.length; i++)
              getGridField("contactsGrid", 1, grd.aFields[i].sFieldName).value = "";
           //unserialize the hidden field as an object:
           var oAccounts = eval('(' + getField("sAccounts").value + ')'); 
           if (typeof oAccounts == 'object') { 
              for (var rowNo in oAccounts) {
                 if (rowNo != 1)
                    grd.addGridRow();
                 getGridField('newAccountsGrid', rowNo, 'accId').href = oAccounts[rowNo]["accountId"];
                 getGridField('newAccountsGrid', rowNo, 'accName').href = oAccounts[rowNo]["accountName"];
                 getGridField('newAccountsGrid', rowNo, 'createDate').href = oAccounts[rowNo]["created"];
              }
           }
        }
        populateGrid(); //execute when the DynaForm loads
  • 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-16T14:18:13+00:00Added an answer on June 16, 2026 at 2:18 pm

    It would be as simple as:

    var oAccounts = JSON.parse(getField("sAccounts").value);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should be a simple one: I have an observableArray object called To in
Not sure whether this pertains to VS 2010 or to the upgraded framework, but...
This pertains to urllib2 specifically, but custom exception handling more generally. How do I
I'm using ASP.NET, but I'm sure this pertains to any (or most) MVC frameworks.
This question pertains specifically to shell scripts, but could be about any programming language.
This question pertains not only to how to accomplish this task, but to whether
This question pertains to ANSI C. I think that it should be a simple
This question is similar, but it pertains to static methods: In Python, how do
This pertains to Linux kernel 2.6 TCP sockets. I am sending a large amount
I hardly see any pointer on the following problem related to Hibernate. This pertains

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.