Skip to main content
Jun 28, 2021 3:14 PM UTC
Question

Getting unique Thing Property value from ThingTemplates query service

Hi,

 

I would like to get unique Things Properties from query service. I don't want to use infoTable.Distinct()

Example below...

ThingName Property(name of property is custom_pro)

t1                "abc"

t2                "xyz"

t3                "abc"

t4                "xyz"

result should be {abc, xyz}

 

Kindly let me know or any suggestions.

 

Thanks

Gopi

4 replies

Jun 28, 2021 8:22 PM UTC

@gvyakaranam 

 

Following community post might help.

 

Jun 29, 2021 5:10 AM UTC

Hi Sachin,

 

As having bulk amout of things in the platform(>10000), not able loop many times...

For the same purpose, I would like to know if any query service, which will be proving result as distinct list of Property value like "{"xyz","abc"}". Mean that the count of result is 1000 out of 10000 things or more.

 

Kindly let me know.

 

Thanks

Gopi

Jul 1, 2021 6:55 PM UTC

Hi @

 

If we understand you correctly, you could try using the QueryImplementingThingsWithNamedData service to return specific properties you're interested in within a given template.  Then you can use distinct to filter the list.

 

If there is more to this use case than we're understanding, please provide more details and we'll be glad to help.

 

Regards.

 

--Sharon

Jul 12, 2021 7:20 PM UTC

Hi @gvyakaranam

 

If the previous response answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.  If you are still having problems, please let us know.

 

Regards.

 

--Sharon