Parsing value from Filter

Hello,

I would like to be able to take the value of a filter and put it as the title of my report, is it possible? 

 

Thanks

4replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Ngoc Hoang ,

     

    Thanks for writing into the Mode Forum! It certainly is possible to add filter values into the title of a report or visual. Though there isn't a way to do it natively, you can use Javascript to target the results dataset to return the filter value. 

     

    Here is an example report for reference. Please let me know if you have any questions. 

     

    Best,
    Jonathan 

    Like
  • Hi @Jonathan Rosario,

    Thank you for your reply, the sample report you provided is very close to what we need. We just need to insert a text chart and then the text of the text chart is the value being selected of the filter. 

    Would you be able to help us with that? 

    Thanks,

    Ngoc 

    Like
  • Hi Ngoc Hoang ,

     

    Certainly, similar to how the text is being inserted into the chart title, you can insert the same value into a text chart. Rather than filtering down to just the header, you would just select the chart id of the text chart and then add the text to the innerText. 

      var textBox = $("#TEXT-CHART-ID")[0]
    
      textBox.innerText = station_name (or whatever variable that stores the filter options)

    Let me know if that was helpful. 

     

    Best,
    Jonathan 

    Like
  • Thank you so much!

    Like
Like Follow
  • 2 mths agoLast active
  • 4Replies
  • 21Views
  • 3 Following