Try to show leave form to student as per their RegisteredNumber.In Xpath also try to use attribute RegisteredNumber.
in Xpath of your Data Grid you can say that only the ones related to the current user should be displayed. For that you should refer to the association between your entity and the student.
It should be something like this:
Please note that specifying an xpath in the datagrid does not provide a secure way of hiding the leave forms of other users. Even if the leave forms from other users may be hidden in that way, users with technical knowledge can still retrieve the leave forms of all students.
The secure way of restricting access is through entity access: https://docs.mendix.com/howto/logic-business-rules/define-access-rules-using-xpath#3-defining-the-access-rules-on-the-order-entity-using-xpath