I want to Log Filter Data when we click on TextFilter Button

Posted by: sharaththota.zem on 23 August 2022, 6:29 am EST

  • Posted 23 August 2022, 6:29 am EST

    Hi!

    There is a function to console the data when we click on sort button i.e

    let old = GC.Spread.Sheets.Commands.sortFilter.execute;

    GC.Spread.Sheets.Commands.sortFilter.execute = function(){

    console.log(“sort got called”);

    old.apply(this,arguments)

    }

    .is there any other similar function for text Filters to console the data when we click on text filter button

  • Posted 23 August 2022, 6:31 am EST - Updated 3 October 2022, 9:06 am EST

    please find above attachement

  • Posted 24 August 2022, 3:07 am EST

    Hi,

    For this, you may use the following code snippet for the required functionality.

    
    let old2 = GC.Spread.Sheets.Commands.filterByCondition.execute;
    GC.Spread.Sheets.Commands.filterByCondition.execute = function(spread,options){
        if(options.cmdOption.condition._ps.conType === GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition){
    console.log("filterByCondition got called",options);
        }
    
    

    regards,

    Avinash

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels