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

UI Action - How to Callback value from one table to reference/use on an action in another table.

kshort
Tera Expert

UI Action - Form Button in CSM Workspace

 

The following is where I am starting... I created a form button within a single table. The value used to create the URL is found in the existing table. However, what I am trying to do now is create the same form button on a different table (the interaction table) using the value from the consumer table (the value in the consumer table is u_externalshopperid). I'm just not sure the right way to go about that... is it glide form get reference or glide ajax? I am going in circles trying to figure out how to pull a single value for use in my ui action script. 

 

function runViewinCiaClient() {
    if (g_form.getValue('u_externalshopperid') == '') {
        g_form.setMandatory('u_externalshopperid', true);
    } else {
        var consumer = g_form.getValue('u_externalshopperid');
        var number = consumer.trim();
        var link = "https://callcenter-xxx.xxx.com/Index?ps=guid|" + number + "&encrypt=0";
        var win = top.window.open(link, '_blank');
        win.focus();
    }
}
 
My guess so far is that I need to begin with var gr = new GlideRecord('csm_consumer');
then add a gr.addquery to get the value? But then how do I wrap around back to the above?


Thanks for any help! 🙂 
1 ACCEPTED SOLUTION

kshort
Tera Expert

Resolved... something along the lines of... 

 

var con = g_form.getReference('consumer',callback);
}
function callback(con){
        if (con != '') {
        var number = con.u_externalshopperid.trim();
 
etc. etc. 

View solution in original post

1 REPLY 1

kshort
Tera Expert

Resolved... something along the lines of... 

 

var con = g_form.getReference('consumer',callback);
}
function callback(con){
        if (con != '') {
        var number = con.u_externalshopperid.trim();
 
etc. etc.