Cognos Dynamic Filtering - cognos

I searched all over the internet but couldnt find an answer.
I want to create
1. a radio button with two options A, B (which are supposedly two columns in the database with "date" datatype) and
2. a date prompt
Now if the user selects option A with a date range(in the date prompt) the data should be filtered on A
if the user selects option B with a date range(in the date prompt) the data should be filtered on B

Your question is far from clear, but if I understand you want to use the radio button to determine which date column to use in a filter? If so, then something like this should work:
if (?RadioButtonPrompt? = 'A') then ([DateColumnA] = ?DatePrompt?)
else ([DateColumnB] = ?DatePrompt?)

If I get this straight:
1. You first want to create a Radio Button:Value Prompt with values from DB
2. Then you want to filter another Prompt based on selection of the Radio button Prompt. (You can do this by what Andrew has suggested)
To create a Radio button prompt, Drag a Value prompt > Select Radio Button Group (under Select UI) > Select Query > Select Use Value and Display Value
My guess is that you are having trouble creating Query which will just give you a single row with two date columns...
Hope that helps....

Related

Disable tab click on some editors in table

Would it be possible to disable "Tab" events on specific columns.
My current table has 4 input, 1 of which is a dropdown for status and the rest are text fields.
The scenario is that the users are inputting data on the text fields but they don't want the dropdown to open up on the next row and just proceed on the next text field.
If the values are static, you could use a custom editor to do your work.
Working Demo: https://codesandbox.io/s/disable-tab-some-editors-ud5vit?file=/src/index.js
In the demo, I used the column "Status" as a select field with three possible values. Tab won't make dropdown appear by default.
Hope it helps!

Sharepoint Designer 2013 - Filter drop down menu

I have a form on Sharepoint, whereby I have 2 drop-down controls.
Lets say the first one has values "A, B and C" to choose from.
According to the option selected in the 1st drop-down, I will have to populate the 2nd drop-down accordingly.
Is there a way to do that in Sharepoint Designer or Infopath?
The dropdown are both created similarly;
Or if I can at least filter the 2nd drop down, according to the value chosen in the 1st drop down.
I am newbie in Sharepoint dev, and need some tips on the above.
if I've understood you correctly, what you are trying to do is populate the 2nd dropdown list based on what is selected from the first.
Have you tried to put a filter on the 2nd drop-down, like this...?
Open up your list form in InfoPath
Right click on the 2nd choice field and select, 'Drop-down List Box Properties'
Click on the button to the right of 'Entries'
Click on 'Filter Data' button
Click on 'Add'
Enter the condition (i.e. 'Choice' is equal to 'Choice', or whatever the name of your 1st choice field is.)
Does that work? (I'm assuming you aren't using a secondary data source.)

Check for duplicate value among 10 combox boxes when summit excel vba

I have 10 comboboxes on my userform that share 10 same selections, and I would like to check for duplicated value before summit.
As far as I can imagine, there are two ways to get the result, the first one is to check for same value among these ten boxes when summit by using message box OR to hide the selections from other comboboxes once the option is being selected by any one of the boxes.
Since I am new to vba, I am having a hard to grasp this idea in to code, please help.Userform with 10 comboboxes that share the same selections
I think your second idea is the best, because it prevents the unwanted behavior instead of correcting it.
You can either build a responsive sql which filters out the already selected values, or you could create 10 queries, one for each combobox.
Start by creating a table with values you want to have for your selection.
Make a query like this: (Combobox1) SELECT value FROM Table;
This is the input query for your first combobox.
Create a second query (Combobox2) based on the first query. SELECT value FROM Query1 WHERE value <> Forms!formname!Combobox1
This will be the input query for your second combobox.
Now create a third query based on the second like: SELECT value FROM Query2 WHERE value <> Forms!formname!Combobox2; Which will be the input for your third combobox.
Keep on doing this untill you have a query for each combobox.

Multi option custom MsgBox popup window

I am not sure if this is even doable in Macro (VBA). The issue is, if a user enter a value in specific cell (lets say A2). I need to trigger a popup window (similar to MsgBox function) with several option for the user to select in the popup (either a drop down list or Radio buttons). The values in the drop down list or Radio buttons can be populated in the code. I need to let the user select the option "value" from the list and then can click OK or Cancel. The value that the user selected would be display in the same cell. I checked online and it seems like there are very small selections for the MsgBox function. Can this be done??
Thanks,
Your best option would be to use Data Validation to make a drop-down list.
If you go to Data-Data Validation-Allow-List you can create a drop-down list of all values you want. Store all of the values you want in the drop-down list on another sheet and just set it as the Source.
Any other issues let me know.

Excel : Input and Retrieve Data using Textbox

I have a listBox with different countries name, when a country is selected information related to this country will show up in a textbox. I did that using a simple VLOOKUP for a table containing the countries and comments columns.
=VLOOKUP(INDEX(countries,$C$10),countriestable,2,FALSE)
Now let's say I would like to add a Second TextBox, which will have a reverse action, user will input data/Comments in the textbox and this will be saved in the countriestable accordingly (As per country selected )
The problem is I could link the texbox2 to a cell and add the same formula as textbox1, but then when I input data, it will overwrite the linked-cell formula, then when I change countrie from the listbox, the values in Textbox2 logically will noo change ( static ).
How can I achieve a way where ( On same page ) I have a texbox to display data from the table ( Step1 is succesfull ) and a Texbox in which a user can write/input comment data ?
Thanks for any guidance,
Regards
Excel version 2007
You need to decide if and when you want to transfer the comment of textbox2 into countriestable. As countriestable is a kind of "master table" I wouldn't recommend to go for formulas in it trying to pull comments across from the user sheet ... master tables should not contain formulas ... too elusive
Instead I would make the textbox2 field without any link to any specific Excel cell, but instead add a button which the user can press to transfer his/her comment into the countriestable. I also would maybe consider an additional column in countriestable for "user-comment" (as opposed to "generic-comment" which you retrieve upon entering/selecting the country). Lastly I could think of making 2 buttons instead of 1, with the functions "Add to user comment" / "Replace user comment"

Resources