Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

Hi Rebeccad,

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

Hope this help,

Anosh

View solution in original post

11 Replies
cesaraccardi
Specialist
Specialist

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
Author

Do you know what the search string would be?

nagaiank
Specialist III
Specialist III

Leave the search string blank

cesaraccardi
Specialist
Specialist

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

Not applicable
Author

Hi Rebeccad,

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

Hope this help,

Anosh

Not applicable
Author

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

Not applicable
Author

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
Specialist
Specialist

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
Author

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??