Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Button to clear expression

I have an input box where you can enter a range of Shipment ID's (separated by commas) and a 'Go'  button to search on the inputed values. I also have a 'Clear' button to clear the selection. This all works fine, but the previous Shipment IDs searched still shows up in the input field (even though the selection is cleared). Is there a way to clear the expression, and not just the selection?

My 'Go' button is a 'Select in Field' action:

='('&replace(ShipmentID,',','|')&')'

My 'Clear'button is just a 'Clear All' field. Does anyone have any suggestions?

1 Solution

Accepted Solutions
Not applicable

Re: Button to clear expression

Hi Rebeccad,

See the attached example. This is what Cesar Accardi Jr and krishnamoorthy is saying.

Hope this help,

Anosh

11 Replies
cesaraccardi
Valued Contributor

Re: Button to clear expression

Hi,

You can add another action to the Clear button that sets the variable used in the inputbox (External / Set Variable), if you don't have constraints in the inputbox you can left the field "Value" for the action blank.

Not applicable

Re: Button to clear expression

Do you know what the search string would be?

nagaiank
Valued Contributor III

Re: Button to clear expression

Leave the search string blank

cesaraccardi
Valued Contributor

Re: Button to clear expression

Yes, leave it blank... I said "Value" but its "Search string"

Not applicable

Re: Button to clear expression

Hi Rebeccad,

See the attached example. This is what Cesar Accardi Jr and krishnamoorthy is saying.

Hope this help,

Anosh

Not applicable

Re: Button to clear expression

Got it! Thank you for all your help everyone. That is exactly what Ineeded.

Not applicable

Re: Button to clear expression

Regarding the input field... is is possible to have multiple inputs (one per expression line) without using comma seperators? My box works just fine if you use commas between ID#'s, but if you copy/paste a few rows of Excel data into the expression, it doesn't run.

I thought about using multiple variables, but the user will likely need to input hundreds of Shipment ID's.

cesaraccardi
Valued Contributor

Re: Button to clear expression

Rebecca, for this requirement i think you could use a common listbox with all the available Shipment ID's and you can set the variable like


=GetFieldSelections(ShipmentID_filter)

Not applicable

Re: Button to clear expression

I tried that to no avail.

What about this idea... I could have a button to load an Excel document, then a macro to concatenate all the rows in Column A with comma separators, and then a macro to load that concatenated value into the input field. Is this even possible??

Community Browser