Developer forum

Forum » Dynamicweb 10 » UserSortCollection in DW10

UserSortCollection in DW10

Vincent Gercke
Reply

Hi!

Is there a UserSortCollection equivalent in DW10 if for instance I want to sort users by their sort/ranking in a user group?


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

User group relations has been moved to AccessUserGroupRelation table - and there is no sort column. So you can only sort users by one of their other properties.

 
Vincent Gercke
Reply

Alright, thanks! :-)

 
Vincent Gercke
Reply

Hi Nicolai

Sorry to bother you again with this, but I'm hoping you can point me in the right direction. 

In DW9, our customer used group-based user sorting—users could belong to multiple groups but have different positions within each group. I'm struggling to find a straightforward way to replicate this behavior in DW10 without introducing messy user fields that are difficult for editors to maintain. Also, there is a lot of user groups in the solution...

Do you have any suggestions on how to solve this in DW10? :-)

BR Vincent

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Users are not manual sortable in DW10. We would have to implement it so that AccessUserGroupRelation has a sort column and implement it in the UI.

I will probably never understand why it is needed - but I understand there is a great love of sorting everything. I have created a feature request, devops#24683, to implement it....

A simple solution is a custom field named "Sort" with an int. Then you can at least sort the users in one group - why it is needed to sort differently in several groups - I would really like to understand.

 
Vincent Gercke
Reply

The customer uses it like this: A user can belong to multiple coverage areas, each represented by a group. Each coverage area is linked to a website, where users from the group are shown in the frontend. They want, for example, an "Owner" to show up before a "Student Assistant" – which is doable with a sort field. The issue comes up when the same user is in multiple groups (and websites) but needs a different position in each, since their role or importance can vary between coverage areas.

Let me know if you want to do a quick session where I can walk you through the use case :-)

 

You must be logged in to post in the forum