# adding timestamp to textvalue in browser clickpath Synthetic Monitors

**URL:** <https://community.dynatrace.com/t/adding-timestamp-to-textvalue-in-browser-clickpath-synthetic-monitors/46188>\
**Category:** Synthetic Monitoring\
**Tags:** browser-monitors, synthetic-monitoring\
**Created:** [June 18, 2024, 3:07pm UTC](https://community.dynatrace.com/t/adding-timestamp-to-textvalue-in-browser-clickpath-synthetic-monitors/46188 "2024-06-18T15:07:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sreevanama](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sreevanama](https://community.dynatrace.com/u/sreevanama)\
**Post date:** [June 18, 2024, 3:07pm UTC](https://community.dynatrace.com/t/adding-timestamp-to-textvalue-in-browser-clickpath-synthetic-monitors/46188/1 "2024-06-18T15:07:56Z")

</div>

Hi&nbsp; All - we need to generate a reconcilation report everyday.

for ex: App --\> create recon report --\> “Myreconreportname” . so , i have created a Synthetic check to record the session.

for the first attempt, when i do “record Clickpath” it was successful, when i schedule this synthetic check to run every 1 day, Synthetic check got failed saying “Myreconreportname” already exist.

Script i see in the synthetic recorder is:  
“description”: " keystrokes on \“txtReconReportName\”",

“textvalue”:“Myreconreportname”

i want to add timestamp along with&nbsp;Myreconreportname so that my synthetic check will succeed everyday.

Appreciate if i can get some solution to this

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [June 18, 2024, 3:48pm UTC](https://community.dynatrace.com/t/adding-timestamp-to-textvalue-in-browser-clickpath-synthetic-monitors/46188/2 "2024-06-18T15:48:16Z")

</div>

You will need to use a [JavaScript event](https://docs.dynatrace.com/docs/platform-modules/digital-experience/synthetic-monitoring/browser-monitors/browser-clickpath-events#javascript) to generate the report name.

```markup
var todayDate = new Date();
var reportName = "Myreconreportname" + todayDate;
api.setValue("reportName", reportName);

```

you can then use the placeholder {reportName} for the Keystroke value

 ![HannahM_0-1718725687577.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/a/faaa9443e6f3a6dbf1944f13622832e53a0817bd.png)

---

<div class="post-metadata">

**Author:** ![sreevanama](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sreevanama](https://community.dynatrace.com/u/sreevanama)\
**Post date:** [June 19, 2024, 1:57pm UTC](https://community.dynatrace.com/t/adding-timestamp-to-textvalue-in-browser-clickpath-synthetic-monitors/46188/3 "2024-06-19T13:57:27Z")

</div>

Hi&nbsp;[@HannahM](https://community.dynatrace.com/user/1433)&nbsp; - Thanks for the reply,

Where can i use the sample script shared by you?

```auto
var todayDate = new Date();
var reportName = "Myreconreportname" + todayDate;
api.setValue("reportName", reportName);

```

My Code is looks like below:

{ “Type” : “keystrokes”,

“target”: {

“locators”: [{

“type”: “css”,

“value”: “#txtReconReportName”

},{

“type”: “css”,

“value”: “.form-control:eq(0)”

},{

“type”: “css”,

“value”: “#txtReconReportName”

},{

“type”: “css”,

“value”: “input[type=\“text\”][id=\“txtReconReportName”]”

}]

},

“masked” : false,

“SimulateBlurEvent” : true,

“description”:“Keystroke on \#txtReconReportName\”"

“textvalue”: “{ReportName}” -- Placeholder as suggested by you

 ![sreevanama_0-1718805660780.png](https://global.discourse-cdn.com/dynatrace/original/2X/9/961f734756b46c94f8fce06813847300979c0db5.png)

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [June 19, 2024, 2:24pm UTC](https://community.dynatrace.com/t/adding-timestamp-to-textvalue-in-browser-clickpath-synthetic-monitors/46188/4 "2024-06-19T14:24:46Z")

</div>

The snippet should go in a new JavaScript event which you add prior to the Keystrokes event.

---

<div class="post-metadata">

**Author:** ![sreevanama](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sreevanama](https://community.dynatrace.com/u/sreevanama)\
**Post date:** [June 19, 2024, 3:28pm UTC](https://community.dynatrace.com/t/adding-timestamp-to-textvalue-in-browser-clickpath-synthetic-monitors/46188/5 "2024-06-19T15:28:49Z")

</div>

Thanks&nbsp;[@HannahM](https://community.dynatrace.com/user/1433)&nbsp; it worked.
