Forum Discussion

cartercjb's avatar
03-14-2022
Solved

DYNAMIC SUBTOTAL TEXT

I am trying to remove the Total text portion from the subtotal row so that it only reads the row value - COTA (highlighted in yellow): 

Referencing this KB article, I was able successfully this with the manual text replacement, but I'd rather it be dynamic. 

 

 

 

widget.on('ready',function(e, args){
	$('widget[oid="' + args.widget.oid + '"]').find('span:contains(" Total")').text("COTA");
})

 

 

 

I tried the script below but it only pulls the first level of Credential value, not the correct subsequent values

 

 

widget.on('ready',function(w, args){
$('[id="' + args.widget.oid + '"]').find('span:contains(" Total")').text($("[class='p-dim-member'][fidx='0']:first").find("span").text());
})

 

 

The second subtotal row should read PT not COTA. Then PTA, SLP, etc. 

 

  • cartercjb 

    Please check this script:

     

    widget.on('ready',function(e, args){
    $('[id="' + args.widget.oid + '"]').find('span:contains(" Total")').each(function(index){
        
        $(this).text($(this).text().replace(' Total', ''));
        })
    })

     

    -Hari

3 Replies

Replies have been turned off for this discussion