Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Insert values ​​in a list box

Hi,

I would like to insert into a new list box selected values ​​from the list box shown in Fig, without losing the links to these values ​​with other values ​​in the other list boxes. How can I do?

crawler.JPG.jpg


Thank you all in advance for the answers

greeting
Carlo

16 Replies
MVP
MVP

Re: Insert values ​​in a list box

Could you explain a bit more?

Not applicable

Re: Insert values ​​in a list box

Just the values ​​I selected in the previous image that are part of the list box User Agent I would like to put them in a new box list.

MVP
MVP

Re: Insert values ​​in a list box

If you are using field name [User Agent] in the list box you have shown, take another list box->Expression :

=Aggr([User Agent],[User Agent])

Is this what you want?

Not applicable

Re: Insert values ​​in a list box

In the list box called User Agent there are many values​​. I would like to select only "some" values ​​of the list box User Agent and put them in a new list box.

For example I would like to put in the new list box are the values ​​Icc-crawler,GoogleBot-Image, AmorankSpider etc. CurlPhp, GoogleBot, etc. FeedFetcher. I would I select the values ​​to be included in the new list box.

MVP
MVP

Re: Insert values ​​in a list box

Like:

List Box->Expression =If(Match([User Agent] , '​​Icc-crawler', 'GoogleBot-Image', 'AmorankSpider') ,[User Agen])

Not applicable

Re: Insert values ​​in a list box

Adding this statement I always get the same list box. I could select the values ​​to be included in the new list box without writing a expression?

eruditio
Contributor III

Re: Insert values ​​in a list box

add a new list box.

Go to the field.

Scroll down to the expression level.

Use GetFieldSelection (YourInitialField)

Hope this helps.

Antoine

Not applicable

Re: Insert values ​​in a list box

You could duplicate the field (I used [User Agent2] for the example below) in your script and then add a 'trigger' (Settings, Document Properties, Triggers) in 'Field Event Triggers'.  Find your original field, [User Agent], and then add a 'Select in Field' action under 'OnSelect':

Field: [User Agent2]

Search String: = '(' & GetFieldSelections([User Agent],'|') & ')'

Not applicable

Re: Insert values ​​in a list box

Hi Brendan,

GetfieldSelection returns a string containing the current selections in a given field. I do not want this.

Let me explain better: I have a list box called user agent containing requests made by crawlers and users. I would like to select the crawler requests from the starting list box and place them in a new list box, deleting them from  the starting list box. How could I do this?

Thank you so much for the replies.

greeting

Carlo