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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Only one possible selection value

Hi guys,

I dont know where i am making the mistake.

I have several selections "customername" and "campaignname"

I have 'Only one possible selection' enabled on customername, and i want this to trigger campaignname selection to only the first possible index value.

I've created a trigger on the field customername as such:

Field: customername

Search String:

if(GetCurrentSelections(customername), FieldIndex(campaignname, 1))

Thansk for the help..

6 Replies
Not applicable
Author

Use fieldvalue instead, so do this

if(getselectedcount(customername)=1,only({<campaignname={'$(=fieldvalue('customername',1))'}>}campaignname))

let me know if you come right

cheers,

byron

Not applicable
Author

Forgot to mention. Since you are selecting a customer, you are reducing your data set for all values under that customer. Therefore, the first fieldvalue is your firstindex value.

Not applicable
Author

Thanks for the replies,

Unfortunately it didnt seem to work. I have the trigger set to customername, is that correct?

On opening the document it has a customer selected (which it should) but has not selected any campaign (as it should), meaning the user still has a possibility to multiselect.

if(getselectedcount(customername)=1,only({<campaignname={'$(=fieldvalue('customername',1))'}>}campaignname))

Hoping for help

Not applicable
Author

Can someone please provide a test app for the solution?

Not applicable
Author

Hi Niklas

I spent a bit of time on this yesterday and could not get the field event triggers to behave in the way that you wanted. Why, I am not sure. I will upload the test document later today and maybe someone can have a look and explain why it is not behaving the way it should.

BTW, since one selection is always on customer name, a simpler expression to write on the field event is simply MinString(CampaignName) - Will account for both text and numeric variations of campaignname

Cheers,

Byron

Not applicable
Author

Hi Byron,
Thanks for the help.. Can you  please post the test app.

.Niklas