Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to create a dynamic chart title that contains the search query/term used in a search object.
Is there a variable created by default that I can reference to do this? I cannot seem to find any info on this type of variable (if it exists) or figure out a way to include this filter term like I want.
Thanks in advance.
Hi John,
I would suggest trying the function GetCurrentSelections(' - '). There are a few parameters to it, which are explained in the help file. If you are only looking for the values of one of your selections you would need to do some string manipulation of the output, using mid and index etc.
Hope that helps,
Steve
Hello John,
Knowing the dimensions of the object you are showing, you can title your chart something like (untested)
='Chart 1 ' & GetFieldSelections(Field1) & GetFieldSelections(Field2)
Hope this helps!
Not quite what I am looking for as the GetFieldSelections (as I understand it) would return the selected values in a given field and not the query entered by the user to search across the values.
For an example of what I'm trying to do, suppose there's a search form against a list of states. If a user searches for "new", the returned selections would include New Hampshire, New Jersey, New Mexico and New York.
I am trying to customize the title of the chart to say something like "Data for states that include 'New'"
If I use the above suggestion, I would get each of the 4 state names and not the original search term.
Any ideas?
Think that in this case you should create an inputbox, into which the user have to enter the searchstring. With a macro you then may filter for this string, using this variable. Likewise you then can pickup this variable and display in the title.
HTH
Peter
Hi John,
I would suggest trying the function GetCurrentSelections(' - '). There are a few parameters to it, which are explained in the help file. If you are only looking for the values of one of your selections you would need to do some string manipulation of the output, using mid and index etc.
Hope that helps,
Steve
Steve, While this does not accomplish exactly what I was trying to do, this approach seems to be the closest that QV currently supports. I've opened a new feature request for consideration as a future enhancement.
Thanks for your insight.