Editing a record with a multiselect field - can't get the pre-selected entries to appear

Hello again!
I would appreciate if anyone can help with this issue:

In this database, Managers are users. There is a data type for Staff (who are not users). I have an Admin-level form set up to create new managers (users) and the User data-type has a multiselect field providing the option to add Staff who are not already assigned to another manager. This is all working fine.
Then I have a form set up to edit a manager’s details. This form pulls in the existing manager’s data with the ability to edit the fields and save the update. This is almost working…except for the list of staff in the multi-select. When I am viewing the Edit Manager form, I see the multiselect field and when I click in it, it allows me to add staff to the manager’s profile, but it does not pull in / show the staff already assigned to that manager. Therefore, if I select staff in the multiselect to add to the manager, the original staff assignments to that manager are not part of what’s in the box so they get removed upon the update.

My settings for the multiselect–

Placeholder: [null]
Choices style: Dynamic choices
Type of choices: Staff
Choices source: Search for Staff:filtered (the filter limits the selections only to those staff who are not already assigned to a manager/user - this works).
Option caption: Current option’s First Name Current option’s Last Name
Default value: Parent group’s User’s Staff

I’m assuming the problem is with the default value but I can’t find the right format for that formula to display the entries already present in that field.

I appreciate your time - thanks!

Hi there, @j21… the first thing that comes to mind (for me, at least) is whether or not the parent group has a user. How are you setting the data source of the parent group?

Best…
Mike

@mikeloc - thanks for the reply. I’ve set it up so the Admin sees a list of managers, then clicking an Edit link routes the admin to an edit-user page while passing the User info to the page. The groups on the page must be set up properly because I have four other fields within that same group that are pulling data from the Parent Group’s user, and the detail is coming through correctly on all fields except the multiselect.

Have you checked the debugger? Do you have any privacy rules on the Staff data type? Without being able to see anything, it really isn’t possible to help much here.

According to the debugger under “Custom states and other values” - the parent group has imported the data about the manager from the user table, including the data in the Staff field. In parentheses next to the “Staff” entry, I see “(list of things)”. Could this be a factor? Do I have to program the field to display a list? When I expand the details of that Staff entry, I can see the staff’s details that are assigned to this manager. So the info is getting to the page, jsut not into the field itself.

EDIT: I do have a permission set up that anyone with the Admin role should be able to see / do everything.

Oh, wait… I might know what it is. I think the filter on your search for staff is prohibiting the dropdown from showing the user’s staff. Trying setting the choices source to the parent group user’s staff merged with the search for staff:filtered that you already have, and see if that does the trick.

1 Like

That was it @mikeloc ! I added a :sorted command to the end of the formula and now both lists blend together nicely. That’s a HUGE help. Thanks again!

1 Like