Widget Reference Field Helsinki

Ken83
Mega Guru

Hello Community,

        Hopefully a very simple question here but I haven't found a solution yet so I figured I'd throw it out there while I'm still hunting. How do you create a reference field on a Widget in Helsinki? Since these aren't XML based, the Jelly syntax g:ui_reference is no longer an option.

6 REPLIES 6

Hello Nathan,


How I have to change your widget to get something like that:


1. I got 3 reference fields on sys_user table in SNOW. For example my User got Team Leader & Manager & Senior Manager like below


find_real_file.png


2. And my result using your widget


find_real_file.png


What I have to change in server & client & tamplete to download reference fields from sys_user to service portal ?



Best regard,


Artur


Hi Nathan,



Can you please help me find out a similar thing which using sp-model.


I am using   sp-model and using user table but wanted to apply an additional filter to the table. How can I do that?



HTML code:



<form>


              <sp-model form-model="::c.data.user" mandatory="::c.data.user._mandatory"></sp-model>                      


  </form>



Server Script :



data.user = {



"_fields" : {


"IO:user_field" : {


"refTable":"sys_user",


"sys_id":"",


"read_only":true,


"max_length":40,


"_class_name":"ReferenceQuestion",


"ed":{  


"reference":"u_employee",


"searchField":"name",


"qualifier":"",       // Should we give here something, Whats the format ??


"name":"user"


}


}


},


"_sections" : [


{"columns": [


{


"fields" : [


{


"name" : "IO:user_field",


"type" : "field"


}


]


}


]


}


],


"_view":[


{


"name" : "IO:user_field",


"type" : "field"


}


],


"client_script":{


"onChange" : []


}


};



//Removed irrelevant content from Server Script.



Sunil Singh