Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dselgo_eidex
Partner - Creator III
Partner - Creator III

Select in Field action, select no values

Hello, I have a variable that can either contain a search string or be blank. I have a button that uses the Select in Field action to apply this search string to a field. However, when the search string is empty, the action will select all of the possible values instead of not selecting any. I figure I can do this using a macro, but I'd like to know if it is possible within the list of actions.

1 Solution

Accepted Solutions
dselgo_eidex
Partner - Creator III
Partner - Creator III
Author

Actually, I figured out my issue. When my search string was supposed to be NULL, it was actually (""). This caused the Select in Field to select all values which matched that search string, which was every possible value. I adjusted the search string to actually be set to NULL and it now works fine.

Sorry, should've waited a bit before posting this question.

View solution in original post

7 Replies
Anil_Babu_Samineni

How you are define the search string in your action of the object?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
dselgo_eidex
Partner - Creator III
Partner - Creator III
Author

The search string is set up like ("A"|"B"|"C"). It is stored into a variable, so my action is:

Select in Field

Field

vSearchString

There is a case where vSearchString will equal null, and I don't want any values to be selected, but the action seems to be selecting all of the possible values anyway.

sunny_talwar

Would you be able to share a sample to check out the issue?

dselgo_eidex
Partner - Creator III
Partner - Creator III
Author

Actually, I figured out my issue. When my search string was supposed to be NULL, it was actually (""). This caused the Select in Field to select all values which matched that search string, which was every possible value. I adjusted the search string to actually be set to NULL and it now works fine.

Sorry, should've waited a bit before posting this question.

antoniotiman
Master III
Master III

Hi Danny,

try this :

Select in Field ->  Field :

=If(Len(Trim(vSearchString)) > 0,'Your Field')

Regards,

Antonio

Anil_Babu_Samineni

You can use like below   ("A"|"B"|"C"|"")

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Please mark your own response as correct to close this thread.

Best,

Sunny