Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

snyalakonda
New Contributor

Problem with current selection box

Hi,

I Have a requirement where  i have to use action->to select field->and in place of search string i have to use a variable.

This works fine as expected ! but the values in current selection box is showing as below.

("india"|"usa"|"uk")

instead of showing india,usa,uk

Attaching a sample application,can someone please provide me the solution to this problem.

Thanks,

Sandeep

13 Replies
chinnuchinni
Contributor III

Re: Problem with current selection box

just modify your your variable value as :

=GetFieldSelections(Country)

snyalakonda
New Contributor

Re: Problem with current selection box

Hi Praveen,

Thanks for the replay.

In real, i have field values with spaces your solution is only working without spaces .

Please look into the new attached file.

Thanks,

Sandeep

chinnuchinni
Contributor III

Re: Problem with current selection box

you can use in script.

trim(Country) as Country

snyalakonda
New Contributor

Re: Problem with current selection box

this does not solve my problem,

1)i cant trim the field values

2)search string in actions is not working if there are spaces in field values that is why i have used the below expression

='('&chr(34)& GetFieldSelections(Country,chr(34)&'|'&chr(34)  ) &chr(34)&')'

Thanks

MVP
MVP

Re: Problem with current selection box

Try with chr(39), instead of chr(34)

hdbucher
New Contributor III

Re: Problem with current selection box

Id Country len(Country)
0
1India5
2USA3
3UK2
4Australia9
5Brazil6

I still do not understand your need, but in the field Country no have spaces...

The idea of Praveen is very good, solve in the script!

snyalakonda
New Contributor

Re: Problem with current selection box

tried with 39 its not working

snyalakonda
New Contributor

Re: Problem with current selection box

Hi Guy,

thanks for helping out.

Let me put it in a simple way,i need a button by clicking it USA new,UK new and India new should be selected in country field

and current selection box should show USA new,UK new,India new

insted of ("USA new","UK new","india new").


Thanks

snyalakonda
New Contributor

Re: Problem with current selection box

Hi Guy,

thanks for helping out.

Let me put it in a simple way,i need a button by clicking it USA new,UK new and India new should be selected in country field

and current selection box should show USA new,UK new,India new

insted of ("USA new","UK new","india new").