How to select empty value by default in Reference selector when loading the page

Hello Al,   I am showing list of Users using Reference selector. By default it is selecting the last value whenever i load the page. How can i change it so that by default it will be empty when loading the page.   Thanks,
1 answers

Iam using Mendix 7.23.15. Never noticed such behavior. Not sure if there is some issue in Mendix 8. 

But it is good to debug and check if your entity has associations set already which is pointing the item which you are seeing in screen.


Based on your comment, if your Setting entity is associated with User with 1-* association, then you have 1 Setting object.

So, when you use that Setting object and want to show the list of Users with reference selector, then you will see all the previously selected users.

Because this is how reference selector works.

  • You can try to empty the association before loading the screen, but all the previously selected users will be lost.
  • If you want to solve this, you can have an helper entity with 1-* association to User. Then you could develop pages to show no selections but at the same time, you can also preserve the selected users for Settings. Later when you save, you can get the actual Setting and add users to the reference selector. 
  • But this way of rendering will confuse the user.