The CreatorCon Call for Content is officially open! Get started here.

sn-record-picker with multiple="true" truncates results after first pick

Ross Walker
Tera Contributor

I have business requirement for a multi selector on a portal page for raising incidents.
this is so user names affected can be recorded.
but when the first is selected it seems to truncate the results for the second name and a lot of the time the 2nd or later required pick wont show, same can happen if the name order is switched around

im using a very simple sn-record-picker, added the script below, 

<sn-record-picker

field="user"

multiple="true"

table="'sys_user'"

display-field="'name'"
display-fields="'user_name,email'"

value-field="'title'"

search-fields="'name,email,user_name'"
page-size="100">

</sn-record-picker>

 

it might be a simple mistake i cant see

 

the truncation seems to be those that have the same title (job title)

6 REPLIES 6

debendudas
Mega Sage
Mega Sage

Hi @Ross Walker ,

From the code I understand that you want to create a reference field of User table, and you want the "title" field of the user as the value.

Also, you want the user records to be multi selectable.

 

In this case, please use multiple=" 'true' ".

 

below is the updated code:

<sn-record-picker
  field="user"
  multiple="'true'"
  table="'sys_user'"
  display-field="'name'"
  display-fields="'user_name,email'"
  value-field="'title'"
  search-fields="'name,email,user_name'"
  page-size="100">
</sn-record-picker>

 

Hi @Ross Walker ,

 

Did you get any updates?

 

Please mark my answer as correct and helpful, and give it a like if it helped you. This will show that your question is answered and can help others too.

 

Thanks!

Hi @debendudas 
The code you have provided is the same as the code i provided in my question

Hi @Ross Walker ,
You need to use additional single quotes to provide true value in the multiple attribute:

multiple="'true'"