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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with space in trigger, GetFieldSelections() and Selection List

Hello,

I have a little problem:

- I load a list in an inline mode in my main script

:

LOAD * Inline

[%_Zone_art

'Class1'

'Class2'

'Class3'

'Product Manager'

'Priority Level'

'Product'

];

- I add a selection list in my program

- I add triggers to always have 'Class 1' selected if no record is selected (I want this one and not only one selected)

%_Zone_art

='('&if(GetSelectedCount( %_Zone_art )=0,'Class1' ,GetFieldSelections(  %_Zone_art,'|' ) )&')'

My problem is when I select 'Product Manager', the selection is erased fos this record... I can't select it.

When I remove space and name it 'ProductManager' it is OK...

Have you got an idea ?

Thank you,

Willy

1 Solution

Accepted Solutions
sunny_talwar

Try this as your trigger expression

='("'&if(GetSelectedCount( %_Zone_art )=0,'Class1' ,GetFieldSelections( %_Zone_art,'"|"' ) )&'")'

UPDATE: Added " double quotes to the expression so that it can handle spaces in field.

View solution in original post

3 Replies
sunny_talwar

Try this as your trigger expression

='("'&if(GetSelectedCount( %_Zone_art )=0,'Class1' ,GetFieldSelections( %_Zone_art,'"|"' ) )&'")'

UPDATE: Added " double quotes to the expression so that it can handle spaces in field.

Not applicable
Author

Hello,

thank you very much.

I will try on wednesday and tell you.

Regards,

Willy

Not applicable
Author

Hello,,

your answer is correct.

Thank you very much.

Willy