Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
punitpopli
Specialist
Specialist

Alternate states and Trigger together

Hi,

I am facing an issue with Alternate state and Trigger.

I have two product tables in which the column name for Product is different (i.e. Product1 and Product2 ) but have the same column values (e.g. Samsung,LG,Philips, Sansui, Videocon..) and we are driving 2nd column values based on selection of 1st column using triggers i.e.

If I have selected Samsung in Product1 and same values will get selected in Product2 using select in field trigger on Product1 for Product2 as : '("' &Replace(GetFieldSelections(Product1),', ','"|"') & '")'

In my current scenario I have 4 alternate states and when I select Product1 from any of the state it will trigger the Product2 in the inherited state as well. Is there any way to restrict the selection in inherited state or when I select Product1 in State A it will trigger product2 in State A only.

Working:

When I select Samsung from Inherited state then it will drive Product2 in all the states and if I select different values in respective state i.e. of I select Sansui in State B then this value get changes in all the states including inherited state. is there a way to restrict the selection in same state.

Have anyone faced he similar issues? If yes, kindly share your views. Attached is the sample file for our reference.

Thanks in advance

Punit

8 Replies
Anonymous
Not applicable

Hello,

I made some changes in your triggers (just for State-A and State-B as examples).

Le me know!

Elena

punitpopli
Specialist
Specialist
Author

Hi Elena Prandoni,

Not working the way I require.

When I first select from State A and then from State B the Product2 values from State A get cleared, which should remain as it is.

Thanks

Punit

Anonymous
Not applicable

I'm sorry for the mistake!

Can you try now?

Elena

punitpopli
Specialist
Specialist
Author

Thanks a Ton... Elena Prandoni...But need to check with multiple selections

Regards,

Punit

Anonymous
Not applicable

Dear Punit,

I was reviewing my solution and I think there is a problem with multiple selections...

Can users select more than one item? If so, my solution doesn't work properly.

Please, if it's the case, uncheck my answer as correct in order to get suggestions from other people.

Elena

punitpopli
Specialist
Specialist
Author

Hi Elena Prandoni

Yes you are right, the solution doesn't work in multiple selections...

-Punit

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Are you using SR8? If so, you can use the new StateName parameter available in GetFieldSelections(). Modify your select string to include the State Name like this:

='("' &Replace(GetFieldSelections(Product1,', ',1000,'State-A'),', ','"|"') & '")'

-Rob

http://masterssummit.com

http://robwunderlich.com

Anonymous
Not applicable

Hello Elena Prandoni,

It was really very helpful post. i was stuck in same kind of situation.

Only in example you have use two field Product1 and Product2, for my case i had to handle the case on one field only.

Your solution had help. Thanks

Regards,

Hitesh Wagh