Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
papabaer
Contributor
Contributor

Combobox w/ data from a field

I need a combobox input control, with values populated from a field.  I'd like to take the user-selected value - assign it to a variable, and then use that variable to do more processing etc.  I can't seem to find a way to do the 1st part of this:  It seems I either have an input box available that makes a 'selection' - which I don't want - or I have an input box that only allows manually-entered, pre-defined values for the input list.  Am I missing something obvious? Or is this actually difficult?  (I'm accustomed to VBA in Access - and this is simple stuff in that environment...) --- thanks for any help!

1 Solution

Accepted Solutions
Not applicable

Hi,

You can create an Island Field ( A field loaded from resident table in qlikview which doesnt have any relation to the data model but have same data as the source field in the resident table).

So in the front end use this island field to let user select waht ever they want and you update your variables or process the selected data or anything. Being this island field and no relation to main data model user selection will not make any imapct.

Let me know if u have still doubts in getting done this.

Cheers.

View solution in original post

11 Replies
Not applicable

Hi ,

correct me if i'm getting it in a wrong way ..,

you mean a multi box with values populated from a field and you wants to save the valus user selected into a variable for further calculations .

if so declare a variable and assign getfieldselections( your field name ) gives you the values which are been selected by users .

thanks

Meher

papabaer
Contributor
Contributor
Author

I think you're on the right track...  but it looks to me like any of these boxes/controls will automatically apply the selection made by the user.  There appears to be no 'generic' UI control - so it seems I will have to use triggers to intercept whenever any change occurs to the multibox - figure out what state it's in, grab the values (if a selection has been made) - undo the selection (again, if appropriate), to be sure I've UNDONE what it wanted to do --- and only then can I proceed with my algorithm to make the selections I want.  Sound right?  This seems like an awful lot of bookeeping just to ask the user for a value...   but then I'm new to QV.

Not applicable

Just a thought ,

If you have two fields in the multi box try to declare two different variables where variable1 grabs selected field in field1 and variables2 does . there is no need to make any undo of selections try to make always 1 selected which helps you to prevent user to make multiple selections in that field . so by making this you can proceed with your algorithm which will have always a value in the variables wich you are using and which will not have any chance to take null values .

Thanks

Meher

papabaer
Contributor
Contributor
Author

Interesting - but isn't the user still selecting a field in this case?  If so, I still need to undo that selection.

btw - Thanks for your quick responses!

Not applicable

If you know that what value that user is going to select we can trigger to select that value onopening the dashboard or onactivating the sheet, we can trigger a action onopening the sheet and onactivating the sheet to select by using onopen & onactive action which helps you to prevent user to make selections but for that you have to know that the user is gonna be select that specific value

thanks

Meher

papabaer
Contributor
Contributor
Author

I'm not sure what you mean.  If I knew in advance what the user was going to select, then I wouldn't need the input box...   -- and I'd like to stay away from using triggers up at the sheet level if possible since that will slow everything down (I assume...).  I think I know what I need to do now - but now I need to figure out what the syntax is to check the state of the multi-box (like what is the syntax for checking (in code) that it has changed or that a selection has been made?  I hope the documentation is good - or I'm in for more hair-pulling --- thanks again!

Not applicable

what i mean is , if you have a requirement like always select a top value or 2nd top value or last value or select top of sales etc.,  which we can trigger but it seems like you doesn't have that sort of requirement

thanks

Meher

Not applicable

Hi,

You can create an Island Field ( A field loaded from resident table in qlikview which doesnt have any relation to the data model but have same data as the source field in the resident table).

So in the front end use this island field to let user select waht ever they want and you update your variables or process the selected data or anything. Being this island field and no relation to main data model user selection will not make any imapct.

Let me know if u have still doubts in getting done this.

Cheers.

papabaer
Contributor
Contributor
Author

OK - that sounds like what I'm after - (now to just figure out how to do that...)

thanks much!