- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
11-23-2022 06:17 AM
Hi Team,
I have developed automation to get all the similar incident names with dictionary return results that have ID and incident name.
Once I call the script from the widget, pie, table, or any of them, I get the following error; anyone can help !!
11-24-2022 06:40 AM
Hi, well I don't know how the script written, but you can use as an example the scripts in the "integrations and incident health check" pack.
In the pack, you have multiple example of how you should return the data for the widget (/dynamic sections).
11-25-2022 12:20 AM
Hi @bzahran, I think it might be an issue with the structure of the results. Check the examples here - https://docs.paloaltonetworks.com/cortex/cortex-xsoar/6-9/cortex-xsoar-admin/widgets/create-a-custom....
I think to process most chart based results. It needs to be list of dictionaries. Like the example below.
data = [
{"name": "2018-04-12", "data": [10]},
{"name": "2018-04-10", "data": [3]},
{"name": "2018-04-17", "data": [1]},
{"name": "2018-04-16", "data": [34]},
{"name": "2018-04-15", "data": [17]}
]
demisto.results(json.dumps(data))
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!