I’m trying to create a lobby tile with a scripted data source. (FSM 6.5)
My Client Script SQL and Client script are both working. I can preview my data source from the data source designer screen and see the result from my script. The script is returning a single number and appears to be in a column named “return”.
I’m struggling to get the number returned from the data source to be displayed in the actual element tile. There is just a big X where the number should be.
Since this is my first scripted lobby tile I must be missing a step somewhere.
Anyone know what it could be?
Thanks!
Page 1 / 1
Hi @csanders
Try creating your basic table without aggregations.
Use the aggregate function on the element designer.
For example, your script might return a task subset
Select task_id, task_status from task where task_status = 'OPEN'
Then you aggregate by task_id and use one of the functions
Cheers!
@Shneor Cheshin Thanks for the reply!
In the element designer when I select a script type data source the Column and Aggregate options disappear off the screen.
The data source designer shows that my script is returning the value of 63
But this is what the preview of the tile looks like in the element designer.
It seems like it should be working. Any other ideas?
@csanders
As I advised. Create a table/view with no aggregations. So it will return records and not a number.
The aggregation configure in the element.
Cheers!
@Shneor Cheshin, I realize I could create a view and make this tile work the way all of my other tiles do. I really just wanted to see what I could do with a script data source. So far I can’t get them to work at all.
I’d be happy with any example of a scripted data source working.
This is my script which is currently returning a value of “63”
Script Name: GOS_LOBBY_HSA_ERRORS (Version 1)
var worksFrom = getUserInfo('WorksFromPlace'); return getDBValue('LOBBY_HSA_ERRORS', worksFrom);
Hey @csanders
I am trying to understand your query.
Can you please share that? Maybe it is implemented in ‘GOS_LOBBY_HSA_ERRORS’?!
Cheers!
@Shneor Cheshin Instead of getting hung up on the query, I modified my script to just return “10” (With no query). How can I get the tile to show 10 now? Thanks.
It shows “10” in the data source designer.
Element designer preview still shows an X.
@csanders
That is the point. I am trying to suggest you with a workaround.
I am not sure why it is not showing, might be a bug? I suggest to open a support call for this issue.
As a workaround, Instead of returning a number, I suggest you use SQL to return a table of records and aggregate the results in the element itself.
Cheers!
@Shneor Cheshin, as I said before when I select a script type data source from the element designer the aggregate option in element designer disappear from the screen, so there’s no way to do what you suggest. I could get this tile working with a different type of data source. Using a script data source was the entire point for me. Thanks for your help, I agree that this seems like a bug.