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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Getting my infotable to my stream

Tomellache2B
14-Alexandrite

Getting my infotable to my stream

Hello everyone

 

I have a stream that has a property infotable.

I want to write a service inside of that stream, I want this service to get each row ID inside of my infotable and store these IDs within an array.

 

I have tried using the queryinfotableproperty history service.

This does not seem to work.

 

Kindly suggest how I can go about fixing this?

 

Thank you so much.

1 ACCEPTED SOLUTION

Accepted Solutions

@Tomellache2B ,

 

Thanks for the code sample.  The service you are using above is used on properties of that Stream thing, not for columns that are actually in the stream.  To access stream entries, you would use the service QueryStreamEntriesWithData.  That will give you the metadata (i.e. the Id of the stream entry) as well as the data columns in each row.

 

Thanks,

Nick

View solution in original post

4 REPLIES 4

@Tomellache2B ,

 

Is this a Stream thing or a Value Stream? Also, could you share some of the code you're using?

 

Nick

Tomellache2B
14-Alexandrite
(To:nmilleson)

Hi Nick

 

This is a stream Thing.

I have attached a screenshot below.

 

Screenshot (80).png

@Tomellache2B ,

 

Thanks for the code sample.  The service you are using above is used on properties of that Stream thing, not for columns that are actually in the stream.  To access stream entries, you would use the service QueryStreamEntriesWithData.  That will give you the metadata (i.e. the Id of the stream entry) as well as the data columns in each row.

 

Thanks,

Nick

To clarify the QueryInfoTablePropertyHistory vs. QueryStreamEntriesWithData a bit more on your stream thing:

 

If you were to click on the Properties tab of your stream, create an Infotable property, and set logging to true, it would log that property's history to a Value Stream (if you have one set up on your Stream thing).  Then you would use QueryInfoTablePropertyHistory to access the history of that property on your Stream thing.  That is not tied in any way to the contents of the Stream that you are storing on the Stream thing.

 

Conversely, when you add entries to your stream using AddStreamEntry or AddStreamEntries, you would then use QueryStreamEntries or QueryStreamEntriesWithData to access the data that is inside that Stream.  Again, it is not tied in any way to the Properties of the Stream Thing.  

 

Hope that helps clear it up a little.  

Top Tags