# Trim GUID from a URL

**URL:** <https://community.dynatrace.com/t/trim-guid-from-a-url/45329>\
**Category:** Real User Monitoring\
**Tags:** user-actions, usql, user-sessions\
**Created:** [April 27, 2024, 10:28pm UTC](https://community.dynatrace.com/t/trim-guid-from-a-url/45329 "2024-04-27T22:28:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dataplayer](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@dataplayer](https://community.dynatrace.com/u/dataplayer)\
**Post date:** [April 27, 2024, 10:28pm UTC](https://community.dynatrace.com/t/trim-guid-from-a-url/45329/1 "2024-04-27T22:28:39Z")

</div>

How can i extract only the GUID (in bold) from the following url using TRIM function with USQL:

[test.abc.com/CRMX/workplace/home](http://test.abc.com/CRMX/workplace/home)\_dashboards.aspx?sitemappath=Workplace%7cMyWork%7cnav\_dashboards&pagemode=iframe&dashboardId=%7b **f2b9e0b0-57e7-ed12-9142-005046962a4c** %7d&dashboardType=1031

SELECT useraction.targetUrl AS “DashboardId”,  
FROM useraction where useraction.targetUrl LIKE “\*dashboardId\*”  
GROUP BY DashboardId  
ORDER BY useraction.targetUrl DESC

---

<div class="post-metadata">

**Author:** ![PierreGutierrez](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pierregutierrez/32/5934_2.png) [@PierreGutierrez](https://community.dynatrace.com/u/PierreGutierrez)\
**Post date:** [April 28, 2024, 12:24am UTC](https://community.dynatrace.com/t/trim-guid-from-a-url/45329/2 "2024-04-28T00:24:42Z")

</div>

Hi&nbsp;[@dataplayer](https://community.dynatrace.com/user/74624)&nbsp;  
The function TRIM or some function that make the same functionality (like in SQL Database) doesn’t exist in Dynatrace USQL.

I think in 2 possibilities to help you:

1 .- **Use Session and action properties:** If you can catch the same data (targetUrl) with any "Expression type " , you can apply Regex (Apply cleanup rule) . Then you can use that value in USQL 💪

 ![PierreGutierrez_0-1714263833638.png](https://global.discourse-cdn.com/dynatrace/original/2X/3/39e9584eac49d9d2d055e26ee3436df7962a401c.png)

2.- **Business Event:** &nbsp; If you want to identify and apply some rules like TRIM. Or You can and want to send exactly the value of DashboardID . I recommend you use Business Event 🚨  
[https://docs.dynatrace.com/docs/shortlink/ba-business-events-capturing#report-business-event-rum](https://docs.dynatrace.com/docs/shortlink/ba-business-events-capturing#report-business-event-rum)

I hope it’s helpful 💪
