I'd like to know whether or not its possible to use a prompt answer as a condition to conditionally format ( hide or display) an object ( a text box ) in a Microstrategy document.
All help is appreciated
Cheers!
you can't use directly the prompt answer (I assume you where trying to use {&PROMPT1&}, because this was also what I tried to do in the past), but you can use the result of a dataset that contains that prompt as condition for your conditional formatting. Of course this method has limitation.
When I had to show/hide few labels (text boxes) depending on the values of a prompt, I used an attribute element prompt and then I used that attribute in my conditional formatting. The limitation is that my prompt accepted only a single answer.
I think it's possible to do something similar also with a value prompt, but you need to have a metric that returns the value of that prompt and then use that metric in the condition.
Related
I have elastic index that get a new document every X minutes, which one of its fields is a boolean field that determines whether a server is up or down (true or false, and no prometheus can't help because the logic behind it is complex and already implemented by another team).
I'm trying to create a simple grafana stat panel, which will be green or red based on the value of the most recent document we get from the query.
I tried many transformations and options with no success. I don't mind using value mapping or another solution as long as I can get red/green panel (and I also tried this direction with no success)
The only way I managed to do it is using logs table, using group by transformation using the first timestamp and is_up field, and only showing the is_up value using organize fields.
But this solution is ugly and bad, and for some reason I couldn't color the cell even after using value mapping (true->1, false->0)
EDIT: I managed to do it (and will post it as answer if no one will be able to improve it), I used logs metrics and with the calculation I chose first, and by using filter by name transform I chose to only show to is_up field.
But now my problem is that I cannot color the fields based and the state. I tried using value mapping which helped me before, but now for some reason it doesn't work at all.
EDIT2: It worked by changing the true/false values to 1/0 and then everything worked as I wanted in the panel. I'll post this solution as an answer after the bounty ends
Posting my solution as an answer because this is the best way I managed to solve it, and no one answered it yet, so I hope it would help other people in the future:
The solution:
Pick logs as your metric
Use first as the calculation in Display options within Panel options
Add Filter by Name transformation, and only show the field you're interested in (is_up in my question)
If you want to color the panel correctly you will have to change the way you create new documents in your index- instead of using a boolean field change it to int and just use 0 as false and ` as true, than you will be able to use thresholds correctly.
If you still want to show true/false or up/down as the stat of the panel use value mapping and change 1 to up/true and 0 to down/false.
I navigate between different dashboard pages via action links.
I have on top of all the pages a dashboard prompt which contains a division as a dimension to filter on. This division has different roles so I have 3 aliases for it. However I don't want the end consumer to bother with these different roles, that's why I pass through the value of the division via a presentation variable.
But sometimes the value doesn't appear in the prompt but the analysis beneath it filters on the correct value (so the passing through seems to work okay. And sometimes it does work correctly.
I can't seem to figure out the difference from when it works and when it doesn't. I have the scope of all my dashboardprompts on 'dashboard' and actions from 'navigate to bi content' is also on 'dashboard'.
I don't pass through the value of the dimension via the presentation variable but I am using the 'is prompted' option. So this looks like the value is indeed in my prompt but just doesn't show up.
Has anyone else have had this problem and can help me solve this?
Thanks!
Seems like once you set the Testers field on a Test Case in MTM, it will not allow you to clear it. You are only allowed to change it to a different value. Has anyone found a way to clear this field?
It is important to not get the "Assigned" Tester field confused with the Assigned To field. They are distinct fields on a Test Case work item. One reason why someone might want the Tester field to be blank is if a team all pitches in to help with testing during an iteration and leaving the assigned tester blank allows the team to know that no one has "picked up" this test to execute. The team member could then assign the test to his or herself and execute it.
The template pulls the Assigned Tester Values from a list using the 'AllowedValues' tag. Instead, simply change this to 'SuggestedValues'. That will allow for empty values - easy as that.
If you'd rather not allow free entry, you can also add a default value such as 'None' and use that rather than blank.
Unless you've customized your work item type, this field should never be blank after being saved. It defaults to the person who created the bug in all Microsoft supported process templates, and a value is required by default.
That being said, why would you want to change it to blank?
If you really, really want to be able to blank it out (which I don't think is a good idea at all), you'll need to customize your template. See the below guidance:
http://msdn.microsoft.com/en-us/library/ms243849(v=vs.110).aspx
I have an application that has 'macro' capabilities. When I map some keys on the keyboard to perform the 'macro', I can also have it launch vbscript instead.
What i'd like to try and do is within my vbscript figure out what keys were used in order to launch the script. Is it posible to do this? Could there be a way in vbscript to figure out what keys were last touched on the keyboard and then I could apply my logic.
The purpose of doing this is to keep the code in a single .vb file instead of several seperate .vb script files(one for each keyboard mapping, possible 3-4). Obviously we are looking to just maintain 1 file instead of multiple files with essentially the same code in each one.
I am leaning towards the idea that this is not possible, but i figured this would be a worthy question for the masses of StackOverflow. Thanks for the help everyone!
What you are asking for is not possible.
Can you change your VBScript to accept parameters and then call it with a different parameter based on which hotkey was selected?
I agree with aphoria, the only way to make something like this possible is if your keyboard mapping software allows you to assign a script/command with parameters/arguments. For example if you used
c:\Temp\something.vbs
then you would change this to
%WINDIR%\system32\wscript.exe c:\temp\something.vbs "Ctrl-Alt-R"
Then in your vbscript code you could collect the argument using the wscript.Arguments object collection to do actions based on what argument/parameter was passed. See the following two links for more info:
http://msdn.microsoft.com/en-us/library/z2b05k8s(VS.85).aspx
http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept04/hey0915.mspx
The one possible approach you may use is to install keylogger and read its log in your VBScript.
For example save script start time in the very beginning of the script
StartTime = Timer()
and then read one log record of your keylogger before this time.
I made a report with about 30 different rectangles and textboxes that have different visibility expressions depending on the parameters. (It's a student invoice and many different messages have to appear depending on the semester) When I made all the expressions I coded in the parameters in all upper case. Now I have a problem when users enter lowercase letters, the SQL all works fine since it is not case sensitive, but the different rectangles and textboxes don't show. Is there a way in the report code to first capitalize all the parameters before running the SQL? Or do I actually have to go back to every visibility expression and add separate iif's for upper and lower case? (That seems incredibly silly to have to do). I can't change my parameters to numbers because I have been given strict requirements for input. Thanks.
I do not know if this is the most elegant solution, but you could accomplish this by following this procedure for every parameter on the Report Parameters page:
1)Re-name the parameter, leaving its prompt as that of the old parameter.
2)Add a new parameter with the same name as the old parameter.
3)Mark this new parameter as Hidden.
4)Make sure that the new parameter's available values are marked as non-queried(available values will never be actually used.)
5)Mark the Default Values as Non-queried, using the following syntax:
=ucase(Parameters!OldParameterName.Value)
Can't you just UCASE the params (do it in the xml view, it will be quicker and you might even be able to do a regex find/replace)