|
Please refer to the code below. Instead of the value of How do I get the
|
|
Hey Jiuan. This can be done, but not this way. First let me try and clear up a couple things-- 1) I think the second ConvertToIntention is just a copy and paste error from the example you were using? It will do nothing because it's converting a 'series_setting' key that nobody ever creates. Can you confirm that there's nothing that its supposed to be doing? 2) The 'linkSearch' param on SingleValue never effects the search that the SingleValue renders it's data from. Instead it provides a simple static way to override the search that will run when the user clicks on the link. The search that SingleValue renders from is just determined by the HiddenSearch above it, and any intentions that exist at that point. I have a feeling you may have drawn an understandable but incorrect conclusion as to what the linkSearch param does. 3) let me try and restate your goals from the user's perspective and see if that can shake anything out. -- user selects an 'app' from the pulldown, or just leaves it at 'App2' which is the default. -- user selects a timerange, or just leaves it at the default value. -- Obviously i dont know what the macro's are doing but it seems fair to assume that they are presenting some overall metric of response time. The strange thing that leaps out is that you are running this search without using the user's selection of 'app'. is this intentional? I say this because if you look at the HiddenSearch module right above the SingleValue, there's no $app$ within the 'search' param there. (Also while we're at it you're doing the stats by app, but the search clause before stats is deliberately narrowing the results to a single app='rsafi' which confuses me a little. At any rate since you're choosing to use the stringreplace intention and there's no $app$ in the search it'll just ignore it. ) -- when the user clicks on the link, now you want to do a different search. Although obviously it's going to be a 'related' search it could be completely different except a) you need it to now use the user's selection of 'app', and b) you need it to use the same timerange. OK, those are the minor things. At least I think they're minor. =) Bad news: SingleValue's linkSearch is a very simple, very static parameter and doesnt work this way at all im afraid. It's an optional parameter and if you use it, it overrides the default behaviour and just runs the string you gave it verbatim. There's no dynamic replacement. Hardly anything in 4.0.X actually does dynamic replacement of $foo$ tokens. Without radically digressing we do think about this a lot and it would be cool if in future versions you could re-use dynamic keys anywhere. Good news: this is possible although i cant think of a way to put the link on the SingleValue module itself. Again, i assume that you do not intend to use the user's selection for 'app', within the search that generates the average resp_time statistic, so im not doing it here either.
|
|
The I don't have a complete alternative solution, but one thing that may be workable in the meantime is to attach a
to attach the
then the result will be a new link 'View results' that appears underneath the single value module. The main developers for this are out; a better answer will appear next week.
(23 Dec '09, 22:12)
Johnvey ♦♦
(from dcroteau): Thanks Johnvey....Before I try this, will ViewRedirectorLink take the value of "$app$"? $app$ is the results of a saved search. I understand about some of the Dev-s being out for the remainder of the week. Have a great holiday.
(28 Dec '09, 17:59)
Johnvey ♦♦
No, ViewRedirectorLink also does not listen to those dynamic tokens.
(28 Dec '09, 18:00)
Johnvey ♦♦
ViewRedirectorLink doesnt know about the token directly, but the HiddenSearch above it certainly does. Maybe look again at the code sample I posted - you can see im using the $app$ replacement in HiddenSearch, and then the HiddenSearch contains the ViewRedirectorLink. End result is what you want.
(05 Apr '10, 17:36)
nick ♦
|
|
Can you please repost this with the "code sample" mode, and pasting in plain text? It's hard to know what you really entered. But when you pass a value of a variable into a macro, you do not surround it with $ signs, you simply pass in the value as it seems you're doing with the rest of the macros, e.g., probably it should just be:
(With the backticks, which I can't seem to get to display here.) (from Jiuan) Could you please refer to Case # 37344? The sample code is there. Meanwhile, I tried your suggestion above but in vain. The value of $app$ is not passed to the search macro.
(23 Dec '09, 20:19)
Johnvey ♦♦
|
|
SingleValue linkSearch = search terms
So in Juian's example he is passing in the results called app, and the results do not show up as choices in the dropdown |
