Table Download - Use Global Variable as file name

Hi,

I am trying to set the name of the Excel file that is downloaded when clicking on “Download” in a table, based on the value stored in a global variable.

What is the configuration that I need to set to replace the “fileName” so that I can use the global variable?

 "download": {
      "type": "excel",
      "fileName": "Monthly Aggregation",
      "full": true
    }

I already tried to use the “$filename” property, and this resulted in the downloaded file name taking the name of the table element as the downloaded Excel file name, though no errors arose.

"download": {
      "type": "excel",
      //"fileName": "Monthly Aggregation",
      "$filename": {
        
        "value" : "{{g_material_id_selected}}"

      },
      "full": true
    }

I guess you have a typo in your config.
Try it with $fileName

"download": {
      "type": "excel",
      //"fileName": "Monthly Aggregation",
      "$fileName": {
        
        "value" : "{{g_material_id_selected}}"

      },
      "full": true
    }
1 Like

Great call! Now it’s working, thank you! :sweat_smile: /facepalm