Subtask.taksrelID = task.ID and LookUp(TaskDataSource, taskIDColumn = Subtask.taksrelID).relProjid = Project.ID
Here, you need to replace TaskDataSource with the name of datasource for tasks and taskIDColumn with the uniquie identifier of the datasource. You will need to add TaskDataSource in the datasource list.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!