You can’t check for a user in a dataview (as far as I know). What I would do is use a microflow as data source for the dataview instead of database or XPath. Create a microflow like this (Picture 1), retrieve the current user with the $currentUser variable (Picture 2) and then take that return value to retrieve the form which has that name on it.
Then use the return value of that retrieve action (which holds the logged in user) and retrieve the forms from database with this XPath (use range ‘all’ here not ‘first’):
Mine has an error because I don’t have a Studentnummer attribute.
At the end you should have a list of objects left. You can set the return value of the end event to that list of entitiy forms (or what your forms entity is called) and use the retrieved forms list as the return value.
If I understand you correctly you want to retrieve the forms of the logged in user, right? You can retrieve the name of the logged in user by using “$currentUser/Name’ which holds the username of the logged in user. Then just retrieve the form in which ‘[Studentnummer = $currentUser/Name]’.
Are you sure though the Studentnummer holds a name and not a number?