Skip to main content
mar 2, 2026 2:54 p. m. UTC
Pregunta

Handling Sql server table rows using Thingworx

  1. How to display all rows in mashup. It displays only 500 rows.

Eg :- A mashup grid displays rows from SQL Server, It displays only 500 rows.

 

     2. How to work on access on buttons in mashup.

Eg :- A button should visible for only few users.

 

2 respuestas

mar 2, 2026 3:19 p. m. UTC

1. You set maxRows to some high value. default is 500

 
 

sql_service.png

2. You create a service like "CanUserSeeButton" and it checks if the current user has specific UserGroup he needs to have, returns true/false which you bind on button visibility. To get current user you can use snippet.

currentUser.png

To get his groups check https://community.ptc.com/t5/ThingWorx-Developers/How-to-Find-all-User-Groups-for-a-Given-User/m-p/1038382 

Or you only check for specific usernames - but a group would be easier to handle on the long run 😉

mar 2, 2026 3:29 p. m. UTC

Just two comments:

1) Setting maxRows to a high value means all rows are pulled from the table, which can result in  high server load and long waiting times for the user.

If the number of rows in the table is not under your control, you probably want to implement paging. Thingworx Help Center and Support knowledgebase have information about this.

2) Making the button visible/enabled only for some users does not mean they can't call the service launched by the button. They could still launch a REST service directly. Which means you have to assign the correct privileges to that service as well.