sn-record-picker display-field needing to be a reference field

xiaix
Tera Guru

Here's a head-scratcher...

I have a table:   u_bcp_sites

I have a reference field on this table (u_location) which references the cmn_location table.

My Service Portal widget HTML Template code:

<sn-record-picker field="BCPSite" table="'u_bcp_sites'" default-query="'u_locationISNOTEMPTY'" display-field="'u_location'" value-field="'sys_id'" search-fields="'u_location'" page-size="10" ></sn-record-picker>

Well of course the field results are all blank, because I need the getDisplayValue() of the u_location field.

Too bad we can't do something like this:  

display-field="'u_location.getDisplayValue()'"

So... any way to get this to work?

(tapping nathanfirth lightly on the shoulder )

1 ACCEPTED SOLUTION

Odd.... this works:



find_real_file.png





Why am I able to dot-walk for search-fields but not display-field???


View solution in original post

10 REPLIES 10

So I took your suggestion, and here's the result:



find_real_file.png




find_real_file.png




Looks good so far, eh?.... think again.     If I type into the box, no matter what I type, I get "No matches found"




find_real_file.png


Odd.... this works:



find_real_file.png





Why am I able to dot-walk for search-fields but not display-field???


Hi David,


But I have tried but it is giving the same invisible records.


find_real_file.png


find_real_file.png


How can I resolve this?


You sure it's user.user_name and not user.u_user_name?



EDIT:   Strike that, I see it's supposed to be user_name.


Let me try it on my end and see what I come up with.


As I stated before:   Dot.Walking the display-field won't work.