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

Grid rows undefined and display as many rows as available in DB

svisveswaraiya
17-Peridot

Grid rows undefined and display as many rows as available in DB

Hi,

We are fetching rows from Database using sql query. We can't specify that we will receive only certain number of rows. In ThingWorx, by default it is set to defined 500 max items (rows) in sql query and we can edit it but in Live/Real we will might get even more than 1 lakh or even more than that, So we can't specify any limit to fetch the rows. Is it possible to make the max items of rows undefined so that it can fetch as many rows as available without limitation or is it possible to make it infinite? 

 

Thanks,

Shalini V.

1 REPLY 1

Hi Shalini V,

 

ThingWorx will still cap maxItems at 500 if the variable is left undefined for performance reasons.

 

The following approach might work if you are using a JavaScript service to query but please be advised that large queries will impact the performance of ThingWorx:

 

You could make a call to the Database before you run your query to get the count of the records in the Table you are about to query, then use that value as the variable used for maxItems in your following query.

 

If you are using a SQL Query service however, I don't believe that can by dynamically updated.

Top Tags