- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2023 11:44 AM
Hey Community
I have 4-5 different forms on service portal which are linked to each other, each of them behaves as a different stage on the service portal.
Now the task is as soon as 1 form is submitted or the state changes or user moves from one form to another it should capture the timestamp.
I have a timestamp field created in each field.
How can I achieve this.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 12:35 AM
Hi @SnowUserDev ,
Assuming you are talking about Record Producers over here. You can either create a BR on each table & whenever the stage is moved from one to another it must have certain field where it gets completed or something u can add that under the BR condition for eg state is completed then it should trigger after update. This way we make sure it just runs at that time only & updates proper time in Time stamp field.
Under advance u can write below script
current.time_stamp = new GlideDateTime();
current.update();
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2023 12:22 PM - edited 12-04-2023 12:28 PM
Hi @SnowUserDev ,
You can trace the "updated [sys_updated_on]" field after form submit, you can set your custom timestamp field same as updated field.
-Thanks,
AshishKMishra
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 12:42 AM
Hi @AshishKM ,
Thank u so much for replying.
If I map the updated field will it not update everytime if some changes are made?
I mean why if the user changes the form as draft
I just want to capture the time only when it moves to next stage or current form is closed complete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 08:02 AM
@SnowUserDev, i didn't mention about the state change condition because you already know that condition to apply. Avoid current.update(); Thanks for marking helpful.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 12:35 AM
Hi @SnowUserDev ,
Assuming you are talking about Record Producers over here. You can either create a BR on each table & whenever the stage is moved from one to another it must have certain field where it gets completed or something u can add that under the BR condition for eg state is completed then it should trigger after update. This way we make sure it just runs at that time only & updates proper time in Time stamp field.
Under advance u can write below script
current.time_stamp = new GlideDateTime();
current.update();
Thanks,
Danish