Default value for selection type range in List Report(Fiori Elements) - sap-fiori

I have created a List report application based on Fiori elements.
In my CDS, i have defined below property for filter :
#UI.selectionField: [{position: 80 }]
#Consumption.filter.selectionType: #RANGE
header.diffrence as DayNo,
Requirement is to display default value of filter (DayNo) less than equal to '5',
#Consumption.filter.defaultValue
gives only 'equal to' values.
Is it possible to set default selection operator to 'less than equal'?
regards,
Umar Abdullah

Related

How to change format / treat missing values in SPSS

I'm using SPSS modeler and I have a variable that the software recognizes as numeric. So the missing values are $null$. I want that the missing values of the variable are selectionable with '', as character.
So I would: or trasform the format of the variable from numeric to character or change only the missing values from $null$ to ''.
How can I fix?
thanks in advance
The best way to select null values in a numeric field is to use the #NULL() function from the Blanks and Null section of the Expression Builder.
For example, if you wanted to keep only the null values so that you could inspect them, you might use a Select node. Leave the radio button set as Include. Press the Expression Builder (calculator) button. Change the filter in the drop menu on the left side from General Functions to show Blanks and Null (press B 2 or 3 times). Double-click on #NULL(ITEM). Go to the right side and double-click on your numeric field name. Put a Table node at the end and run it.
Using Select #NULL in IBM SPSS Modeler
Another way to view just the null rows is to enter the #NULL(varname) function into the "Highlight records where" section of the Table dialog box.
"Highlight records where" dialog
When you run the table, any row that is true for this condition will be shown in red.
If you really need the variable to be a string, then use a Compute node to create a copy of this field under a new name and use the to_string() function in the Conversion section of the Expression Builder to change the type of the variable. Now you will be able to use the the Select node to grab "" as the missing value. Or you could use the Filler node to replace the column, but then you would not be able to compare before and after.
The dialog examples shown in this answer use this sample stream that is installed with your IBM SPSS Modeler software:
C:\Program Files\IBM\SPSS\Modeler\18.0\Demos\streams\featureselection.str
The easiest way to do it it's using the Fill node with the configurations:
A) FIELD
B) Condition = #NULL(#FIELD)
C) Replace by = ' '
This node will replace all $null$ for ' ' at the same variable chosen in option a.
I don't think you can customize how you visualize $nulls. (I know it's possible in SQL db though)
So I'd suggest that you work with the numbers and when you want to visualize or export the results, then turn the field to a string one then replace nulls:
Filled node > to_string(#FIELD)
Filler node > blank and nulls > #FIELD = ''

Get Rapidminer to transpose/pivot a single attribute/column in a table

I have a table that looks like the following:
ID City Code
"1005AE" "Oakland" "Value1"
"1006BR" "St.Louis" "Value2"
"102AC" "Miami" "Value1"
"103AE" "Denver" "Value3"
And I want to transpose/pivot the Code examples/values into column attributes like this:
ID City Value1 Value2 Value3
"1005" "Oakland" 1 0 0
"1006" "St.Louis" 0 1 0
"1012" "Miami" 1 0 0
"1030" "Denver" 0 0 1
Note that the ID field is numeric values encoded as strings because Rapidminer had trouble importing bigint datatypes. So that is a separate issue I need to fix--but my focus here is the pivoting or transposing of the data.
I read through a few different Stackoverflow posts listed below. They suggested the Pivot or Transpose operations. I tried both of these, but for some reason I am getting either a huge table which creates City as a dummy variable as well, or just some subset of attribute columns.
How can I set the rows to be the attributes and columns the samples in rapidminer?
Rapidminer data transpose equivalent to melt in R
Any suggestions would be appreciated.
In pivoting, the group attribute parameter dictates how many rows there will be and the index attribute parameter dictates what the last part of the name of new attributes will be. The first part of the name of each new attribute is driven by any other regular attributes that are neither group nor index and the value within the cell is the value found in the original example set.
This means you have to create a new attribute with a constant value of 1; use Generate Attributes for this. Set the role of the ID attribute to be ID so that it is no longer a regular attribute; use Set Role for this. In the Pivot operator, set the group attribute to be City and the index attribute to be Code. The end result is close to what you want. The final steps are, firstly to set missing values to be 0; use Replace Missing Values for this and, secondly to rename the attributes to match what you want; use Rename for this.
You will have to join the result back to the original since the pivot operation loses the ID.
You can find a worked example here http://rapidminernotes.blogspot.co.uk/2011/05/worked-example-using-pivot-operator.html

Is there any way to limit the selection of SelectItem in smartgwt?

I want to limit the check box selection of selectItem in smartGWT. My select item contains "n" number of options but the user wants to select only maximum of 7 options from the selectItem. How can i achieve this?
You can choose from several ways to achieve this.
I would choose between these two options (depending on your application):
Add a CustomValidator to that Formitem. This validator should evaluate to false if the SelectItem contains as value a list with more than 7 elements. Note that such a Validator could transform the value of the item and that you could specify the error message next to the formitem.
Add a ChangeHandler (via addChangeHandler) to the FormItem and chancel ChangeEvents when more than 7 elements are selected (and provide a notification to the user).

SPSS ordinal data

I have a ordinall variable say A, which has labels 'absolutely yes','yes','neutral', 'no', 'absolutely no'. I want to select only the data which gives value yes for the variable A. Then I want to use these data only and compare some ordinal variables.
So how can I isolate only the data with value yes for the variable A
Something like this should do the trick:
USE ALL. *removes any filters you have in place.
COMPUTE filter_$=(A = 'yes'). *creates a filter variable.
VARIABLE LABELS filter_$ "A = 'yes' (FILTER)". *labels it.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'. *labels the values.
FORMATS filter_$ (f1.0). *formats the filter variable.
FILTER BY filter_$. *this is the uses the filter variable you just created.
EXECUTE.
You can also point-and-click your way to the answer under Data -> Select Cases. Select the "If condition is satisfied" button and make your selections from there.

Limiting Integer Value Between 1 and 100 in grails

i want to do something like that an integer whose value will be always between 1 and 100 how to achieve this and where can i get the list of all Grails data types
Integer profileCompletion
static constraints = {
profileCompletion()
}
A simple Google search for the use of constraints would've given you the correct answer:
From constraints documentation you can read:
range Uses a Groovy range to ensure that a property's value occurs within a specified range
profileCompletion(range: 1..100)

Resources