What I want in the report is as below (* I want to extract the latest status of the job, so the report here only extract the last "Completed" job tasks, But I don't know how can I extract those value "Phase Description", "Next phase" and "Next Target Date"
Here are my table: (MainFlow\JobTestPopUp)
- One Job have many tasks
The content of the job in the report should be :
-Company Name: ABC
-Year End Date: 2025-09-30
-Team: Test
-Completion Date: 2025-08-31 (*As the latest job tasks with "Completed Status is TaskID:178 )
-Phase Code: 100 (*As the latest job tasks with "Completed Status is TaskID:178 )
-Phase Description: Returned from Directors (*As the latest job tasks with "Completed Status is TaskID:178 )
-Next Target Date: 2025-09-01 (Next Pending Job: Task ID 179)
-Next Phase Code : 100 (Next Pending Job: Task ID 179)
Kindly advise solution for above requirement.
Hey Winnie,
Could you explain how your previous task is linked to your current task?
One possible way you could do it is to have one entity be an FK to itself. In this way, when you are creating the next record, you can specify the previous record ID
Then to get the relationship, just simply do an aggregate join of the entity to itself using the FK.
HI, Caulibeam
That's my difficulty right now. I hv no idea on how to make the tasks with connection so I wanna how to link the current task with previous task. Would you mind to make a sample for my reference. I would like to adjust this page. Thanks so much!!
You can take a look at the attached.
What I've done is added the FK reference to itself as the LastJobDetailIdOn the JobDetailDetail screen, I've added some logic in the SaveDetail action to check if the current jobdetail is completed, and if it is, to create the next job step in the phase and to fill in the lastjobdetailid and lastphaseid into the new record.
For the report this is how I've crafted it
Hope this helps.
Hi Caulibeam, but the save here is for Job instead of Job Task check. Can you help with my below logic in save in the Job tasks (phases) ---One job have many job tasks
- There is popup when click "Edit"
- My expectation is there is no check if the tasks ) created is 'pending' in status (cuz we have to create the task list first) -->If last phase is N/A , user can input completion date and status and "save" --> For Job Task ID 2 , the last phase is 10000, so when user would like to edit the completion date and status of Job Task ID2, system have to check if the status of phase 10000 (Job Task ID 1) is "Completed", If yes, then save successfully
Take below as example as well,
- Task ID 86: completion date and status can be edited anytime as last phase is N/A
- Task ID 91: Last phase is 100, need to check the status of phase 100 (TaskID86), if it is completed, user can edit the completion date and status of TaskID91
-Task ID 300: Last phase is 101, need to check the status of phase 100 (TaskID91), if it is completed, user can edit the completion date and status of TaskID91 .
(Mainflow/JobTestPopUp)
Thanks!!! or please advise how to realize my expectation in effective way.