Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
I am using a SQL query that looks something like this:
SELECT COUNT(*) FROM Location
When I test it, I get the following:
How do I get that as an integer datatype? Because I need to bind this value to a label widget or any widget that displays values.
I have tried changing the output basetype to integer and it still does not work.
Solved! Go to Solution.
Can you try wrapping that service in another service and extract the result?
Could you please clarify what error you are getting when you set it as an integer or number?
What is the output type in the screenshot you provided?
When I set it as an integer, it does not give me any errors, it just gives me the same result that is shown in the picture. (but, when I set it as an integer and save it, I see that the output basetype keeps going back to an infotable, which makes me think that this SQL query does not allow integer outputs) The output type in the screenshot I provided is supposed to be an infotable, but there is no columns.
Can you try wrapping that service in another service and extract the result?
Should I make the SQL Query spit out a datatable with 1 column so that it can store the value,
and then write a JS script that takes a datatable as an input and gets the value in the column as an integer
I apologize for the delayed response, for some reason I did not get a notification. Yes, that is what I had in mind. Hope it's how you proceeded and it's resolved now!
Hi @leeejw717.
If one of the previous responses answered your question, please mark it as the Accepted Solution for the benefit of others who may have the same question.
Regards.
--Sharon