Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Parameters

Our QlikView version is: 10.00

We have just started on a QlikView (QV) project. We are migrating our SSRS 2008 reports to this platform. In SSRS we allowed users to paste in values from an Excel Spreadsheet or a Text File into a Multiline Text box. This text box was then used as a parameter/filter for the report.

How do we do the same thing in QV?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

So there may be a delimiter, a line feed.

Check attached modified sample.

Open the input box entry dialog by clicking in the entry field an then on the "three dots" button to open the editor. You'll see the values just copied in as lines, separated by a line break.

I modified the button action to

='('&replace(vTest,chr(10),'|')&')'

to adapt the situation to a line feed as delimiter.

Your situtation might be a bit more complex, if your delimiter is a little different (you can also check for chr(13) CR). But maybe this guides you to some working solution.

Regards,

Stefan

View solution in original post

6 Replies
swuehl
MVP
MVP

The solution is probably depending on the format of values you paste in your input box in QV and the fields / format of that fields you need to filter.

There are some threads here that are suggesting solutions to similar problems, you might want to search for "input box", "filter" etc. For now, I've found this post as a start:

http://community.qlik.com/message/183195#183195

Regards,

Stefan

Not applicable
Author

Hi bitloo,

You can do that creating a variable and text control to modified the value who is used in report expresion.

I hope to help you.

Not applicable
Author

Stefan,

Thanks for the reply, I understood the concept. The issue is... there will be no delimiters. Folks will be pasting it from an Excel worksheet or a text file and the values will look something like this:

1306882147

1780604413

1982640710

1497791230

1740226893

1306862834

I cannot ask them to delimit the values because sometimes it might be just 2 and sometimes 200.

swuehl
MVP
MVP

So there may be a delimiter, a line feed.

Check attached modified sample.

Open the input box entry dialog by clicking in the entry field an then on the "three dots" button to open the editor. You'll see the values just copied in as lines, separated by a line break.

I modified the button action to

='('&replace(vTest,chr(10),'|')&')'

to adapt the situation to a line feed as delimiter.

Your situtation might be a bit more complex, if your delimiter is a little different (you can also check for chr(13) CR). But maybe this guides you to some working solution.

Regards,

Stefan

Not applicable
Author

Stefan,

Call me dumb. But I could not get this to work. This is what I did:

I created a project with 3 objects on it. A list, a button and a text box.

  • The Quarter list is called CAL_QTR. I preloaded the list from my SQL Database.
  • The button has this code: Action = Select in Field >> Field CAL_QTR >> Search String:='('&replace(var_Quarter,',','|')&')'. I was trying with a Comma Delimiter first.
  • In the text box, I clicked on the ellipses (...) to open the editor and typed Q4 2011 and hit the button. But it does not seem to be selecting it.

Not sure what I could be doing wrong?

swuehl
MVP
MVP

If your values contain a space, this could cause issues. I think you need to enclose your values with double quotes then (chr(34)):

='('&chr(34)&replace(vTest2,chr(10),chr(34)&'|'&chr(34))&chr(34)&')'