Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Input Field with Predefined list of positive integers

Dear Forum,

I need a drop down with few pre-defined integer values which will be used for dividing other fields, for ex in expression one can write = sum ( if ( Date < date(today()), Total_Sales) / max ( 1, InUnitsOf )............... This InUnitsOf is what i want to come from input field. Can anyone tell me how to add these value (1,10,100 etc...) in input field.

1 Solution

Accepted Solutions
neetu_singh
Partner - Creator III
Partner - Creator III

Hi,

Can u try this. As per my knowledge may be u r looking for this.

U can do

select object Input Box ---> Declare New Variable ----> Click on Input box Properties -------> Constraints Tab --------> Check the (Predefine Value in drop down) -------> on right side there is a box (Predefine value) --------> check on number series --------> define ur starting & ending point in "From" and "TO" box as : in From : 0 and To :1000

define static step: whatever u want

If u want calculated then put expression in Listed Values Checkbox.

May be it will help out u.

Bye nd TC

View solution in original post

7 Replies
lironbaram
Partner - Master III
Partner - Master III

hei

i wouldn't use input field if i can avoide it

what you described as i see it seem that a Variable would do the work

then you can just defined in the input box object the values for the Drop down list

Not applicable
Author

Thanks RoiUser,

Can u describe a little bit, Can anyone define an array of values in a variable like vInUnitsOf = { 0, 10, 100, 1000 ) .

or

i should do in Properties->Constraint->Predefined Values and check the Listed values.

I tried that but it was not working properly, if u can tell me the full procedure that will be gr8.

neetu_singh
Partner - Creator III
Partner - Creator III

Hi,

Can u try this. As per my knowledge may be u r looking for this.

U can do

select object Input Box ---> Declare New Variable ----> Click on Input box Properties -------> Constraints Tab --------> Check the (Predefine Value in drop down) -------> on right side there is a box (Predefine value) --------> check on number series --------> define ur starting & ending point in "From" and "TO" box as : in From : 0 and To :1000

define static step: whatever u want

If u want calculated then put expression in Listed Values Checkbox.

May be it will help out u.

Bye nd TC

Not applicable
Author

Thanks Neetu,

But in this case there is no fixed steps, like users generally want to divide by 1, 10, 100, 1000, 10000, 100000 etc... sometimes 12 then i can't give steps in List.

Not applicable
Author

Hi,

In your input box properties, tab "constraints", choose "predefined values only" as input constraints and then check the "listed values" box and type 1;10;100 to have values 1, 10 and 100 as pre-defined integers.

Not applicable
Author

Thanks cchicaud,

It worked exactly what i want.

Bye

rahulgupta
Partner - Creator III
Partner - Creator III

Hi, Its fine but plz can u tell me how to use a list of Values from a Field in a Input Box. Eg I Have a Field Say : ReportName containg Data : Report1,Report2,Report3 I have made these values Dynamic by section Access, Eg User1 can see Report1 and Report2 Report1,report2,report3... are the field values in the Field ReportName