- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2025 03:25 AM
Dear Flow experts,
We are using Strategic Portfolio Management in Xanadu patch 7.
We have created a flow for pm_project table. This flow has multiple Ask for Approval steps and this flow can be atarted allover again if there is a rejection for any of the Ask for Approval step. I am able to report on this flow executions using sysapproval_approver table. However I am not able to find the date-time when the current iteration of execution was started. Where can I get this information?
Best Regards,
Ashwini Pingle
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2025 09:36 AM
-> Use Flow Context and Custom Logging.
Here’s how to approach this:
1. Check sys_flow_context
This table stores each execution of a Flow Designer flow.
Steps:
Navigate to System Flow > Contexts (sys_flow_context)
Filter by:
Table = pm_project
Document = [your project sys_id]
Sort by Start descending
Each entry is a new execution of the flow.
This gives you the start time of each iteration, since each restart (manual or system) creates a new context.
2. Optional: Tag Iterations with a Custom Field
If you want to explicitly track each flow round, consider:
Add a field to pm_project:
Name: u_last_flow_start_time
Type: Date/Time
Add a step at the beginning of the flow:
Update Record → pm_project
Set u_last_flow_start_time = now()
Now you’ll have an always-updated timestamp field with the most recent flow start.
3. (If Needed) Tie sysapproval_approver Back to Flow
If you want to map which sysapproval_approver records belong to which flow execution:
Link them via the context field in sysapproval_approver to sys_flow_context.sys_id
Or filter by sys_created_on between start and end of each flow context
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2025 09:36 AM
-> Use Flow Context and Custom Logging.
Here’s how to approach this:
1. Check sys_flow_context
This table stores each execution of a Flow Designer flow.
Steps:
Navigate to System Flow > Contexts (sys_flow_context)
Filter by:
Table = pm_project
Document = [your project sys_id]
Sort by Start descending
Each entry is a new execution of the flow.
This gives you the start time of each iteration, since each restart (manual or system) creates a new context.
2. Optional: Tag Iterations with a Custom Field
If you want to explicitly track each flow round, consider:
Add a field to pm_project:
Name: u_last_flow_start_time
Type: Date/Time
Add a step at the beginning of the flow:
Update Record → pm_project
Set u_last_flow_start_time = now()
Now you’ll have an always-updated timestamp field with the most recent flow start.
3. (If Needed) Tie sysapproval_approver Back to Flow
If you want to map which sysapproval_approver records belong to which flow execution:
Link them via the context field in sysapproval_approver to sys_flow_context.sys_id
Or filter by sys_created_on between start and end of each flow context
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2025 11:38 PM
@Cheikh Ahmadou - perfect. I was already thinking of option 2 but thought that maybe we can get the linkages between context and approval records from system itself. From your option 3 - it seems we need to make this connection. Thanks so much for your response. I can work on this.
Best Regards,
Ashwini Pingle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2025 04:31 AM
The code i had to use for setting datetime is as below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2025 09:57 AM
can you share your current setup along with screenshots about the reporting on flow execution etc? how it's done?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader