Skip to main content
1-Visitor
November 30, 2021
Question

How to get infotable property value data from datatable?

  • November 30, 2021
  • 1 reply
  • 1773 views

Hi everyone,

I have one data table which having multiple user data(user, timestamp, city, designation), I want to write a service to get the data according to selected user as a input using infotable.

Ex;

If I will add two user A and B in the info table property as a input then the result will be A & B user data only in the result. I have used query, queryDataTableEntries etc  service I will pass multiple user input values into infotable property but still it will show only one user result.

Can you please help how to achieve this in thingworx service.

1 reply

22-Sapphire I
November 30, 2021

So based on what you are saying, you've already tried this with an OR construct like shown here:

https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Composer/Things/ThingServices/QueryParameterforQueryServices.html

If that doesn't work, then the only way would be to

Query all records

Filter for Record A add to new InfoTable

Filter for Record B add to new InfoTable

(This I think is slightly more efficient than Query for A and Query for B and add to new InfoTable)

DT_3164961-VisitorAuthor
1-Visitor
December 1, 2021

Hi @PaiChung 

I have one infotable input in which I can add multiple names of user so I want to extract all the data from the datatable of these user which I have added in the input infotable and show it on the grid widget on mashup.

Is there any service or any snippet to extract data of one column with different value(like multiple user name of USER column as input )

 

As you mentioned, 

Filter for Record A add to new InfoTable,

Filter for Record B add to new InfoTable

But the input user name is not fix may be it will one or more so how we can extract all data from datatable if we have multiple user name in the infotable input.

22-Sapphire I
December 1, 2021

You would run it in a loop based on number of user name inputs.