Creating User Multi Selects

1 minute read time.
Once upon a time there used to be a CRM field entrytype called 'user multi select' that seemed to be available to help define new fields. The actual EntryType is designed to be used with communications to allow the assigning of tasks and meetings to multiple users. When the field type was used to create a new column in an entity outside of it's proper context e.g. Projects or Company then it used to generate 'Pointer' errors as it assumed that there was an intersection table between the user and the table to which the user multiselect had been added.

This is because the User multi select writes into a field of data type 'Int' and as an 'Int' field it could never store multiselects and needs a link table to store this information in the link table. e.g.: in communication the user multiselects are stored in the comm_link table.

We can do a trick here to get round the need to put a User Multi Select into a table:

[1] Add a Dummy Translation with Caption Familytype = Choices,
Capt_Family = Users, Capt_code =1;
[2] Carry out a meta data fresh ;
[3] Create a multiselect field (not a user multiselect but a normal
multiselect) and select the Lookup family here as "Users";
[4] Add the field to the target entities Screen;

Try selecting more than 1 person and saving. It should be stored as a comma seperated list in the new nchar field.
Parents
  • Jeff awesome post as always ! Question if one would like to filter the user list down by TerritoryProfile of the user how would you go about doing that so that only certain user would show up in the fancy new multi user select field we can now create thanks to you sharing it with everyone.

    is it as simple as referencing a view (in place of users) for the caption family when setting up the translation?

Comment
  • Jeff awesome post as always ! Question if one would like to filter the user list down by TerritoryProfile of the user how would you go about doing that so that only certain user would show up in the fancy new multi user select field we can now create thanks to you sharing it with everyone.

    is it as simple as referencing a view (in place of users) for the caption family when setting up the translation?

Children
No Data