# Parse the "Account Name:" value from the log results

**URL:** <https://community.dynatrace.com/t/parse-the-account-name-value-from-the-log-results/53106>\
**Category:** DQL\
**Tags:** dql\
**Created:** [August 26, 2025, 2:51pm UTC](https://community.dynatrace.com/t/parse-the-account-name-value-from-the-log-results/53106 "2025-08-26T14:51:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharjeelb](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@sharjeelb](https://community.dynatrace.com/u/sharjeelb)\
**Post date:** [August 26, 2025, 2:51pm UTC](https://community.dynatrace.com/t/parse-the-account-name-value-from-the-log-results/53106/1 "2025-08-26T14:51:15Z")

</div>

Log content:

"A user account was locked out.

Subject:Security ID: S-1-5-18Account Name: ABCASD$Account Domain: ABCLogon ID: 0x3E7Account That Was Locked Out:Security ID: S-1-5-21-436374069-1592454029Account Name:&nbsp; &nbsp; &nbsp; xyz123Additional Information:Caller Computer Name:

"

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

I’m using this DQL but not getting the expected results:

fetch logs  
| filter contains(content, “A user account was locked out”)  
| parse content, “LD ‘Account That Was Locked Out:’ LD ‘Account Name:’ LD:locked\_out\_account\_name”  
| fields timestamp, locked\_out\_account\_name, content

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

 ![sharjeelb_1-1756219809257.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/d/ad153a92e8869cd6a1bb4ed81308d208e86a1d35.png)

---

<div class="post-metadata">

**Author:** ![luis\_alcantara](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@luis\_alcantara](https://community.dynatrace.com/u/luis_alcantara)\
**Post date:** [August 26, 2025, 3:17pm UTC](https://community.dynatrace.com/t/parse-the-account-name-value-from-the-log-results/53106/2 "2025-08-26T15:17:21Z")

</div>

Hi,

I was testing your DPL and I think the solution would be to replace the first two ‘LD’ with ‘DATA’, so it would look like this:

```markup
DATA 'Account That Was Locked Out:' DATA 'Account Name:' LD:locked_out_account_name

```

Here’s documentation explaining why ‘DATA’ should be used in this case:&nbsp;[DPL Lines and Strings — Dynatrace Docs](https://docs.dynatrace.com/docs/shortlink/dpl-lines-strings#multiline-data)

---

<div class="post-metadata">

**Author:** ![sharjeelb](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@sharjeelb](https://community.dynatrace.com/u/sharjeelb)\
**Post date:** [August 26, 2025, 3:18pm UTC](https://community.dynatrace.com/t/parse-the-account-name-value-from-the-log-results/53106/3 "2025-08-26T15:18:54Z")

</div>

It worked! Thank you.

---

<div class="post-metadata">

**Author:** ![deni](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/deni/32/163_2.png) [@deni](https://community.dynatrace.com/u/deni)\
**Post date:** [August 29, 2025, 6:23pm UTC](https://community.dynatrace.com/t/parse-the-account-name-value-from-the-log-results/53106/4 "2025-08-29T18:23:43Z")

</div>

Thanks a lot! 🙂 Until now I thought that DATA and LD were the same (that’s why I was only using LD—it’s shorter). Also, whenever I needed a new line, I was always adding \n&nbsp; … 😀
