# Get information from Davis problem trigger

**URL:** <https://community.dynatrace.com/t/get-information-from-davis-problem-trigger/46098>\
**Category:** Automations\
**Tags:** workflows, automations\
**Created:** [June 13, 2024, 8:00am UTC](https://community.dynatrace.com/t/get-information-from-davis-problem-trigger/46098 "2024-06-13T08:00:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marius\_Hell](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@Marius\_Hell](https://community.dynatrace.com/u/Marius_Hell)\
**Post date:** [June 13, 2024, 8:00am UTC](https://community.dynatrace.com/t/get-information-from-davis-problem-trigger/46098/1 "2024-06-13T08:00:20Z")

</div>

Hi community,

i would like to send problem information to our to ticket system, to inform our customer. Important for this worklfow is the information, which entity is reporting. We send the information to the teams in&nbsp;dependency of the entity.

Unfortunatly the object in the worklfow “Davis&nbsp; problem trigger” only has the information of the affected entity as Id like this [“HOST-B800B96861849859”].&nbsp; For this reason, i can’t send a http-request to the entity, because it isn’t the matching https format.&nbsp; (I know the parameter “affected entity id” is not the best, but first i would like to work with that.)

So i have to customize the information in a java script object.

Placeholder like {{…}} are not working in Java script. So we tried this script to get the informatione from the object “Davis problem trigger”

---------------------------------------------------------------------

_import { execution } from ‘@dynatrace-sdk/automation-utils’;_

_const previousTaskName = 'Davis problem trigger_

_export default async function ({ execution\_id })_  
_{_  
_var exe = await execution(execution\_id);_  
_console.log(execution\_id);_

_var task\_result = await exe.result(previousTaskName);_  
_console.log(task\_result);_

_var records = task\_result[‘records’];_  
_console.log(records);_  
_}_

_--------------------------------------------------_

The output from this script says, that there is no matching object with this id. I checked this information, and saw, that die Id from the object “Davis problem trigger” matched with the id, which ist not found from the script.

Now I have no idea what to do next. I didn’t found any solutions in the documentation and Community.

Can you help me? Are my thoughts to get this information to complicated?

I`m looking forward to your answers!

Regards

Marius

---

<div class="post-metadata">

**Author:** ![ChristopherHejl](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/christopherhejl/32/20735_2.png) [@ChristopherHejl](https://community.dynatrace.com/u/ChristopherHejl)\
**Post date:** [June 13, 2024, 9:10am UTC](https://community.dynatrace.com/t/get-information-from-davis-problem-trigger/46098/2 "2024-06-13T09:10:02Z")

</div>

You can grab the event payload for event-triggered workflows from the execution params like this

```javascript
import { execution } from '@dynatrace-sdk/automation-utils';

export default async function ({ execution_id }) {
  // your code goes here
  // e.g. get the current execution
  const ex = await execution(execution_id);
  const problem_event = ex.params.event

  console.log('Affected entity IDs', problem_event.affected_entity_ids);
}

```

Which would have a result like this

 ![ChristopherHejl_0-1718269755793.png](https://global.discourse-cdn.com/dynatrace/original/2X/c/cacf103bf6e15a6fdecc085a4a8e0da0c570703a.png)

But you could also use it directly in other tasks in the input using expression, eg in the http request like this

 ![ChristopherHejl_1-1718269786311.png](https://global.discourse-cdn.com/dynatrace/original/2X/5/567a863c7ac7216827f46f2cb434b5165cff6dfe.png)

 ![ChristopherHejl_2-1718269795076.png](https://global.discourse-cdn.com/dynatrace/original/2X/a/a4372ef355e1107fc7551d75d44bf8fcad70c2c9.png)

---

<div class="post-metadata">

**Author:** ![Marius\_Hell](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@Marius\_Hell](https://community.dynatrace.com/u/Marius_Hell)\
**Post date:** [June 13, 2024, 11:54am UTC](https://community.dynatrace.com/t/get-information-from-davis-problem-trigger/46098/3 "2024-06-13T11:54:26Z")

</div>

Thank you for your fast solution. Especially the second solutions is more efficient than the intended way from me.

---

<div class="post-metadata">

**Author:** ![joerg\_normann](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@joerg\_normann](https://community.dynatrace.com/u/joerg_normann)\
**Post date:** [March 27, 2026, 12:36pm UTC](https://community.dynatrace.com/t/get-information-from-davis-problem-trigger/46098/4 "2026-03-27T12:36:00Z")

</div>

Hi,  
let me bring up this again.  
It seems to work with fields that have \_ as seperator. But how does that work with fields that have . ?  
like event.id or host.name  
I tried it like this:

```markup
problem_url : environmentUrl + '/ui/apps/dynatrace.davis.problems/problem/' + problem_event.event.id

```

But I get&nbsp; the message:&nbsp;  
An error of type UNCAUGHT\_EXCEPTION occurred in line 15 (col 108) " problem\_url : environmentUrl + ‘/ui/apps/dynatrace.davis.problems/problem/’ + problem\_event.event.id,": TypeError: Cannot read properties of undefined (reading ‘id’)

problem\_event in my case is a const of ex.params.event.

---

<div class="post-metadata">

**Author:** ![joerg\_normann](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@joerg\_normann](https://community.dynatrace.com/u/joerg_normann)\
**Post date:** [March 27, 2026, 12:44pm UTC](https://community.dynatrace.com/t/get-information-from-davis-problem-trigger/46098/5 "2026-03-27T12:44:43Z")

</div>

found it:

```markup
problem_url : environmentUrl + '/ui/apps/dynatrace.davis.problems/problem/' + problem_event['event.id'],

```
