Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
var userData = msg.data.dynamicData.result;  // Get the results from dynamic data node.
if (userData.length > 0) {   // is there any data.
    msg.userDataArray = msg.userDataArray.concat(userData);  // append to the last array.
    msg.pagePntr = parseInt(msg.pagePntr) + 1;  // increment the page pointer.
   // node.warn('Next page ' + msg.pagePntr);
    if(msg.data.dynamicData.paging.hasMore.hasNext === false) {   // is there another page. if not exit loop
       return [null,msg]    
    } else {
        return [msg,null]  // get the next page of data.
    }
} else {
    return [null,msg]   // no data
}

View file
nameDynamic Data Manager Example1.json

Example 2

This example deals with the Read, OR condition, AND, NOT Equal.

...