QlikView aggr more than one value excluded in list box - qlikview

I have a list box that is powered by an expression to hide 1 value.
=aggr(only({<[name]-={John}>}[name]),[name])
But i want to add a second name to this. I have tried...
=aggr(only({<[name]-={John, Alan}>}[name]),[name])
And
=aggr(only({<[name]-={John}, {Alan}>}[name]),[name])

Single quotes are required to indicate explicit values:
=aggr(only({<[name]-={'John', 'Alan'}>}[name]),[name])

Related

Conditionally capturing pre-determined text in one field based on multiple choice selection in another field in REDCap

Problem: How can you capture a pre-determined or static text value based on what choice a user makes from a multiple choice menu on a survey?
Example: Suppose you have the following basic setup:
I have four text statements that correspond to options 1-4 (e.g., "Statement corresponding to Option 1", "Statement corresponding to Option 2", etc.). If the user chooses, say, Option 1 from the sample_options field, then I would like to capture the text value of the pre-prepared statement in the option_statement field. The user should not be able to alter the captured text statement (e.g., maybe hide the field using the #HIDDEN action tag).
Attempt: It seemed like this might be a problem that could be resolved with action tags, namely the #DEFAULT one, but I have been unable to do this. I also thought about trying to use a calculated field instead of a text field for option_statement, but calculated fields must return numeric values:
This seems like a problem that should be somewhat straightforward to tackle, but I have been baffled by just how hard it seems to be to simply capture static text in one field based on a user's selection in another field.
If I understand the question, you want to select a text string from a list of (in this case) 4 options, depending on the user selecting a choice from a radio/dropdown?
Probably the easiest method is to use #CALCTEXT (if you are on a sufficiently recent version), which allows you to conditionally populate a text field, i.e.:
#CALCTEXT(
if([sample_options] = 1, "This is the label for option 1",
if([sample_options] = 2, "This is the label for option 2",
if([sample_options] = 3, "This is the label for option 3",
if([sample_options] = 4, "This is the label for option 4", "This is an else value")
)
)
)
)
But if you do not have #CALCTEXT available to you, you can do this with a #DEFAULT, by constructing another radio field (#HIDDEN if you like) on a separate page or instrument (as #DEFAULT needs the value to exist in the database on page load, and so does not work dynamically on the page), with your four labels as the options with the same choice codes as your [sample_choices] field. For example:
1,This is the label for option 1
2,This is the label for option 2
3,This is the label for option 3
4,This is the label for option 4
And annotate it with:
#DEFAULT='[sample_choice]'
Thus if a user selects 3 for [sample_choice] and proceeds to the page or instrument that has the label field, the #DEFAULT tag will automatically select choice 3 from the label field, which can then be stored in the dataset and piped into an email, onto the page, or whatever.

DevExpress XtraReport - Round Down

Can you tell me how to do rounding like in crystal report? eg: round([field],-2)
How to do Round like the example above. Like we did on Crystal Report. I want to do rounding down on DevExpress XtraReport.
If it value eg. 2514942 I want output: 2514900
Thank you..
you can use CalculatedField for such functionality
add calc field on the same level as your "[field]"
assign to the calc field the expression like "Round([field] / 100, 2) * 100" to reset last two numbers
bind your control to newly created calc field
also here tutorial for the calc fields

dataTables search bar returns incorrect results

When using the searchbar to search for a product, I also get results that do not contain the string I input.
For example, inputting "70" shows the following results : HeatMaster 120, HeatMaster 70, HeatMaster 85.
This is because the rows containing this data have another column, numerical, which also contains "70" (e.g: 170); is there a way I can force this plugin to consider only one specified column when searching ? Or a plugin for this ?
Doing a little test-driven research, I found out that the default behavior of the search box is to search all the fields and return all the rows that contain the input string; to search on only a specific column, I used the columnFilter add-on for jQuery dataTables.
http://jquery-datatables-column-filter.googlecode.com/svn/trunk/default.html

Automatic filling of NAME_1 when entered a valid KUNNR - SM30

I've made a table with three fields: KUNNR, NAME_1 and Z_CLASS. KUNNR has KUNNR as data element, NAME_1 has NAME1_GP and Z_CLASS has a data element that I made with 3 values (1, 2 or 3). I've made the table maintenance generator and put some data in with SM30. Now, I need to make the name of the client show automatically (NAME_1) when I enter a client number (KUNNR) and press enter; and need to make sure that the Z_CLASS is filled and not leaved in blank. I don't really know how to search for the solution because I'm new to SAP. Thank you.
PROCESS BEFORE OUTPUT.
MODULE LISTE_INITIALISIEREN.
LOOP AT EXTRACT WITH CONTROL
TCTRL_Z10FICLASSFICA CURSOR NEXTLINE.
MODULE LISTE_SHOW_LISTE.
ENDLOOP.
*
PROCESS AFTER INPUT.
MODULE LISTE_EXIT_COMMAND AT EXIT-COMMAND.
MODULE LISTE_BEFORE_LOOP.
LOOP AT EXTRACT.
MODULE LISTE_INIT_WORKAREA.
CHAIN.
FIELD Z10FICLASSFICA-KUNNR .
FIELD Z10FICLASSFICA-NAME1 .
FIELD Z10FICLASSFICA-Z_CLASS .
MODULE SET_UPDATE_FLAG ON CHAIN-REQUEST.
ENDCHAIN.
FIELD VIM_MARKED MODULE LISTE_MARK_CHECKBOX.
CHAIN.
FIELD Z10FICLASSFICA-KUNNR .
MODULE LISTE_UPDATE_LISTE.
ENDCHAIN.
ENDLOOP.
MODULE LISTE_AFTER_LOOP.
As for the name, do not keep it as a reundant field. Define a foreign key relationship and then use a maintenance view to display the name that corresponds to the customer number.
For the mandatory field check, edit the generated screen and add a module that checks whether the required fields are filled out. It should also be possible to set the field to mandatory in the screen field options, but I wouldn't recommend this because then the field will be displayed as mandatory even for empty lines.
I've found the answer for both problems. For automatic filling the name of the client I used a form routine with the event "Filling hidden fields" (no. 21). In the generated include I used this code:
FORM fill_hidden.
DATA: lc_name1 TYPE kna1-name1.
Data: lc_kunnr TYPE kna1-kunnr.
lc_kunnr = z10ficlassfica-kunnr.
SELECT SINGLE name1 INTO lc_name1 FROM kna1 WHERE kunnr = lc_kunnr.
z10ficlassfica-name1 = lc_name1.
endform.
For the mandatory field I went to Maintenance Screens, Element List tab, Special Attributes tab and choose mandatory from the drop down menu in the Entry column.
Worked like a charm. Thanks for all your answers :)

dojo query for checkboxes

I want to get all my checked checkboxes from a form and i do like this(and it works)
var cbs = dojo.query('input:checked', 'f');
I wand to add another selector(class selector) to get all checked checkboxes from a form with a specified class. I tried this one but it doesn't work
var cbs = dojo.query('input:checked .xClass', 'f');
Try this dojo.query('input.xClass:checked', 'f');
Pseudo-selectors like :checked act like filters and should be put as suffixes of other selectors. You can select checkboxes with a specified class first using input.xClass, then append the :checked as the suffix.
What does the 'f' do in this case? I tried google for the parameters but couldn't find anything. – user1477388 Oct 11 '13 at 16:20
the second parameter of the query is the starting node for the query.
For instance, the query for < input > tags begins at "#{id:inputText1}" followed by the found nodes having the value of those found nodes, smited away with a null string.