Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
I have a service on a database entity, executing a simple select max() operation, when running in the entity, it works and returns a result (number) as shown in the screenshot. but when I call this service from another db entity as below:
lastTickTimeStamp = Things["Egress_KCT_FTAE"].Get_Last_TicksTimeStamp_Test();
it always return null as lastTickTimeStamp;
However, the other serivce (query to return an infotable) on the Things["Egress_KCT_FTAE"] can work in the same location without problem.
Solved! Go to Solution.
The SQL service returns an infotable, so to get the value you might need to do lastTickTimeStamp .rows[0].lastTickTimeStamp. Use alias in the SQL like MAX(lastTickTimeStamp ) AS lastTickTimeStamp
The SQL service returns an infotable, so to get the value you might need to do lastTickTimeStamp .rows[0].lastTickTimeStamp. Use alias in the SQL like MAX(lastTickTimeStamp ) AS lastTickTimeStamp
Hello @GY_10982725,
It looks like you have a response from a community member. If it helped to answer your question please mark the reply as the Accepted Solution.
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.
Thanks,
Vivek N.
Community Moderation Team.