Link object to current user

0
Hi! I'm quite new to Mendix and at the moment i'm building a library app.      In my domain model I created an entity User with generalization Administration.Account. In the app I made a page where all the books are shown, and as a user, I want to make a reservation on a book. I have a button in the details page of the book, which calls the following microflow to create a reservation: I also have an overview page with reservations. But whenever I run and test my app, the FullName is somehow empty. What I want of course is to show which user made the reservation. Can someone tell me what's going wrong? I hope my question is clear. Thanks so much in advance!
asked
5 answers
4

Hi Saskia,

in retrieve activity  retrieve from account entity and select range as first  and  xpath constraint = [id=$currentUser]

 

thanks

answered
5

Hi Saskia,

Why cant you Have association between reserving and account

You can retrieve from account and have id=current user

If you get any error, please post it here 

Thanks!

answered
1

Hi Saskia Harmsen,

 

First, you should configure the administration overview page for mx admin
then add the users based on the user role

 

Note: Remove the current user to your microflow

 

answered
1

Hi Saskia ,

Make sure if you have full name(from Account Entity) specified for that User.

Hope this helps!

answered
0

Hi Saskia,

 

Administrator.Account access rules might not allow you to read the value, if you logged in as a admin user you should be able to see that.

To show the User who reserved a book you need to overwrite the access rule from the new generalized entity. I would recommend to create a new attribute in your user entity and copy/assign the value while creating / from the Administrator.Account and add your respective security rules to display for other users.

 

 

answered