Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selecting data between range of a field

Hai community members,

I have fields Cid,cname,location,designation. I have the values of the field cid as c001,c002,c003...c008.

My requirement is to have two parameters to select from cid and to cid and display data between these two ID's,

Can anyone of you give me idea .

regards,

ramesh

2 Replies
sarahallen1
Creator II
Creator II

There may be a more elegant way to do it, but first off I'd probably set up a new field in the script,

     Cid_no = num#(subfield(Cid,'c',2))

to pick out the numerical value 1, 2, 3... from c001, c002, c003 etc.

Then you can set up 2 variables fo v_FromCid and v_ToCid, and then put OnChange variable event triggers on these variables, with action "select in field", field "Cid_no".  For the search string, quickly thinking I reckon it would be something like this:

     =     '>=' & num#(subfield(v_FromCid,'c',2)) & '<=' & num#(subfield(v_ToCid,'c',2))

Then make sure your Cid_no and Cid fields aren't accessible, or if they are put field event triggers on them too so as not to mess up the variable event triggers.

Not applicable
Author

Thanks for your Response Hellen, I will try this and get back to you

Regards

ramesh,