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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Unable to convert from com.thingworx.dsl.engine.adapters.VirtualFunction to Infotable

tlichtenberger-
1-Newbie

Unable to convert from com.thingworx.dsl.engine.adapters.VirtualFunction to Infotable

Hey Ankit Gupta​,

thanks for your answer.

Other question:

I want to write an service which calls QueryPropertyHistory in order to fill a time chart.

For that, I again use the GetThingnameForIdentifier service to find the proper thing which I want to retrieve the properties of.

The result should be an infotable so that I can bind the chart with All Data.

My service looks like following:

when testing this service I get following error:

Any suggestions?

Thank you for helping me out!

Theresa ~

Message was edited by: Sushant Pandey branched from https://community.thingworx.com/thread/41652?sr=inbox&ru=13444

1 REPLY 1
ankigupta
5-Regular Member
(To:tlichtenberger-)

Correct way is:

var params = {

    identifier: Id /* STRING */

};

// result: THINGNAME

var thingname = Resources["EntityServices"].GetThingNameForIdentifier(params);

//Things[thingname].temperature= temperature;

var params1 = {

    oldestFirst: undefined /* BOOLEAN */,

    maxItems: undefined /* NUMBER */,

    endDate: undefined /* DATETIME */,

    query: undefined /* QUERY */,

    startDate: undefined /* DATETIME */

};

// result: INFOTABLE

var result = Things[thingname].QueryPropertyHistory(params1);

Top Tags