sn-record-picker need to display multiple fields what is the syntax to use display-fields attribute

Sushma R1
Tera Expert

In my case I'm referring to sys_user table and picking name(display name )field which is not a reference field, my client need the sn-record-picker to show the email ID just below the Name for each record(this feature is very much required because one person will have multiple credentials with different email IDs in my case)   I'm attaching and highlighting how I want it to be shown first . Any expertise on this?

sn-record-picker.jpg

1 ACCEPTED SOLUTION

larstange
Mega Sage

Hi



If you specify the email in the



display-fields="'email'"



the email will be displayed under the user name



and if you do a



search-fields="'name,email'"



The users can be searched by name or email


View solution in original post

16 REPLIES 16

larstange
Mega Sage

Hi



If you specify the email in the



display-fields="'email'"



the email will be displayed under the user name



and if you do a



search-fields="'name,email'"



The users can be searched by name or email


Thanks Lars, it worked for me


Hi Lars,


Do you know if it is possible for one of the display-fields to be a reference field?   I cannot seem to get this to work.   My record picker just shows the name twice.


Thanks


Here is my html




<div class="panel panel-default">


  <div class="panel-body">


                  <sn-record-picker field="company" table="'core_company'" default-query="'active=true'"


                                              display-field="'name'"


                                              display-fields="'name,contact'"


                                              value-field="sys_id"


                                              search-fields="'name'"  


                                              page-size="100">


          </sn-record-picker>


  </div>


</div>


Hi Adam,



field = "field name that you want to refer". say name is reference field then code would be



      <sn-record-picker field="name" table="'core_company'" default-query="'active=true'"


                                              display-field="'name'"


                                              display-fields="'email,contact'"


                                              value-field="sys_id"


                                              search-fields="'name'"


                                              page-size="100">


          </sn-record-picker>




Please hit correct/Helpful based on the impact of the answer


Regards!