Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
l_denivelle
Creator
Creator

Force selected values in list box

Hi

I have created a dimension "Source Type" :

SourceType:

LOAD * Inline [

    _SourceType

    Numérisation

    Extranet/Optiform

];

I have a table named "Source" which contains the following values :

"COURRIER"

"EDI"

"EXTRANET"

"MAIL"

"OPTIFORM"

I created two list box with both "Source Type" and "Source".

For example, when I select "Numérisation" in my Source Type list box, I want "COURRIER" and "MAIL" selected in my Source list box.

How do I do that ?

Thanks.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be like attached sample. Check the :

  • table association
  • trigger

View solution in original post

6 Replies
tresesco
MVP
MVP

May be like attached sample. Check the :

  • table association
  • trigger
l_denivelle
Creator
Creator
Author

Yes seems the right solution !

I'm going to try it.

Thank you.

stigchel
Partner - Master
Partner - Master

Instead of trying to force a selection, you could also link the two tables in the load script on the field source, letting the datamodel make the association. Something like

SourceType:

LOAD * Inline [_SourceType, Source

    Numérisation,COURRIER

    Numérisation,MAIL

    Extranet/Optiform,EXTRANET

    Extranet/Optiform,OPTIFORM

];

When you want to do this in the front end, you can use a trigger on the field _SourceType. Settings\Document properties\Triggers\ and then FieldEvent trigger for _SourceType On Select Add Action Add Select in Field for Field Source with an expression for value like

=if(_SourceType='Numérisation','(COURRIER|MAIL)')

l_denivelle
Creator
Creator
Author

Ok

I will try that too.

Thank you

l_denivelle
Creator
Creator
Author

Is it possible to apply my selection from Source Type list box to one page only and not all my application ?

stigchel
Partner - Master
Partner - Master

Yes, you can place the listbox in an alternate state. Settings\Document properties\General\Alternate states and then add and give it a name. In the listbox you can set this to this alternate state. In the trigger you can also specify this alternate state