Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
swarup_malli
Specialist
Specialist

Can we pass values dynamically from any selected listbox into the error message?

Hi,

I was wonderring if its possible to pass value from any selected listbox into the error message,

Currently I'm able to pass values dynamically from date listbox into the error message using

='Companydoes not have value for' & only(Date)

My requirement is the error message must be able to take values dynamically  from any listbox that is  selected

lets say I click on 2/2/2011

   The message should say

" Company does not have data for 2/2/2011"

and if i click on listbox containing country names..

"" Company does not have data for China"

and if i click on listbox containing  product names

"" Company does not have data for product name ".....so on ..

want to pass values dynamically from any selected list box into the error message

Thanks

Swarup

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

GetCurrentSelections() will give you a string with the current selections, also with fieldnames. You might format the string with optional delimiter and again parse it to get the details you want or just put in in your error message as is.

regards,

Stefan

View solution in original post

3 Replies
swuehl
Champion III
Champion III

GetCurrentSelections() will give you a string with the current selections, also with fieldnames. You might format the string with optional delimiter and again parse it to get the details you want or just put in in your error message as is.

regards,

Stefan

Not applicable

How do you format the string with delimiter?

swuehl
Champion III
Champion III

From the help file:

getcurrentselections ([RecordSep [, TagSep [,ValueSep [, MaxValues]]]] )

Returns a string with the current selections in the document.

RecordSep is the separator to be put between field records. The default is <CR><LF>.

TagSep is the separator to be put between the field name tag and the field values. The default is ': '.

ValueSep is the separator to be put between field values. The default is ', '.

Maxvalues is the maximum number of field values to be individually listed. When a larger number of values is selected the format 'x of y values' will be used instead. The default is 6.

Examples

getcurrentselections ( )

getcurrentselections ( chr(13)&chr(10) , ' = ' ) 

getcurrentselections ( chr(13)&chr(10) , ' : ' , ' ; ' ) 

getcurrentselections ( chr(13)&chr(10) , ' : ' , ' ; ' , 10 )

You might then use e.g. TextBetween/ subfield / subfieldcount etc to parse the string.