4/14/2023 9:23 AM | |
Joined: 2/18/2020 Last visit: 11/30/2023 Posts: 40 Rating:
|
Good morning, I am trying to load data to be displayed in the example gauge Custom Web Control from a MS SQL database. As GaugeValue I set the following script, and with the TraceViewer I can see how the data is correctly read from the database, but is not displayed in the gauge:
Instead, with a synchronous script like the following, it works:
Any hint on how to make it work with async script? |
4/19/2023 2:38 PM | |
Joined: 2/18/2020 Last visit: 11/30/2023 Posts: 40 Rating:
|
With your answer in the other topic I was able to get the asynchronous function working, and I can do the same with the database function by setting the result of the query as the property of the item:Are there alternatives for assigning the query result? |
5/7/2023 2:36 PM | |
Joined: 2/18/2020 Last visit: 11/30/2023 Posts: 40 Rating:
|
By my understandings, in this way you get an undefined [object Promise] instead of the promise result. Check this codepen I made to understand why the return promise didn't do the job |
Last edited by: AutoGen_298806 at: 05/07/2023 15:06:32Last edited by: AutoGen_298806 at: 05/07/2023 15:06:41 |
|
5/8/2023 8:44 AM | |
Joined: 3/2/2020 Last visit: 11/29/2023 Posts: 22 Rating:
|
Hi, My fault, my answer wasn't clear, i use "promise" in normal function, non Async |
Follow us on