cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

AddStreamEntries Problem

lwei
1-Newbie

AddStreamEntries Problem

Hi Developers!

     I have two streams, A stream and B stream, and their data shape are the same.

I've tried to add a part of stream data from A stream to B stream by using service addstreamentries.

But it kept saying Wrapped java.lang.NullPointerException Cause: null

Can someone help me? Appreciated!

Lee

3 REPLIES 3
ttielebein
12-Amethyst
(To:lwei)

Hello, can you please provide the JavaScript syntax you are using to attempt this copy?

var params = {

  oldestFirst: undefined /* BOOLEAN */,

  maxItems: undefined /* NUMBER */

};

// result: INFOTABLE dataShape: "undefined"

var a = me.GetStreamEntriesWithData(params);

var params = {

  values: a /* INFOTABLE */

};

// no return

Things["BStream"].AddStreamEntries(params);

ankigupta
5-Regular Member
(To:lwei)

Hi Lee Wei​,

The output format for GetStreamEntriesWithData service and the input format for AddStreamEntries service is different.

Please refer to following Blog for your answer to your query: How to copy entries from one Stream to other Stream


I hope it helps.

Top Tags