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

How to add magnifying search icon functionality in pop up window form reference field in workspace?

Ankita Kolhe
Tera Contributor

Hi Community,

 

I have an UI Action in Workspace & on clicking on it ,  opens a new pop up window form which consist of a reference field.

 

AnkitaKolhe_0-1706512231081.png

This is a reference field but not having reference search icon & functionality added. The need is to have a reference icon & when user clicks on it, should open a pop up window with list of records ( same as OOB reference field).

 

Please find the UI Action code below:-

 

function onClick(g_form) {
   
    var fields = [

        {
            type: 'reference',
            name: 'add_parent',
            label: getMessage('Entity'),
            mandatory: true,
            reference: 'entity_management_base',
            referringTable: 'entity_management_base',
            referringRecordId: g_form.getUniqueValue(),
        }
    ];

    g_modal.showFields({
        title: getMessage("Map Parent Entity"),
        fields: fields,
        cancelTitle: getMessage("Cancel"),
        confirmTitle: getMessage("Submit"),
        cancelType: "default",
        size: "lg",
        confirmType: "confirm"
    }).then(function(fieldValues) {
       
        g_form.setValue('add_parent', fieldValues.updatedFields[0].value);
        g_form.submit('add_parent_action');
    });


}
 
Please let me know if someone can help on this.
 
Thanks,
Ankita
5 REPLIES 5

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Ankita Kolhe 

 

I saw something on problem tabel

 

 

LearnNGrowAtul_0-1706532247477.png

 

 

check this UI page , how this has been confiured. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************