Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
vijetas42
Specialist
Specialist

Triggers

Hi All,

We have one requirement that,i am having 2 sheets in first sheet i have brand as selection.when i go to second sheet it will clear brand and when i come back on first sheet it should show me previous selected brand value.Can anybody help me with how to achieve this.

Regards,

Vijeta

1 Solution

Accepted Solutions
Anonymous
Not applicable

my fault

Definition of "yourvariable"

I forgot else part

=if (GetSelectedCount(FilialNummer)>0, GetFieldSelections(FilialNummer),yourvariable)

I tested it in my app with the trigger select field yourfield and Expression =yourvariable

View solution in original post

7 Replies
Anonymous
Not applicable

save last selected brand in a variable

whenyou go back to this sheet provide a Trigger with select field

and Expression =yourvariable (or =$(yourvariable)

lironbaram
Partner - Master III
Partner - Master III

hi

first of all , for me i sounds very confusing for the user

as a rule of thumb i try not to use triggers

but for your  case you can do this

when leaving the sheet

1.assign the selections in brand to variable

2. clear brand field

when entering the first sheet

1. select in the brand field the value of the variable

vijetas42
Specialist
Specialist
Author

Hi,

I have crated 1 variable like,vBrand and taken value as getfielseletcion(Brand)

when I go to second sheet I am clearing field Brand

and on first sheet i have applied trigger like,Select in Field where Filed as Brand and value as =$(vBrand)

but it's not working.

Anonymous
Not applicable

the Problem is that you defined getfieldselections(Brand)

and after you clear the brand

so variable contains no value

maybe you could define your variable as

if (getselectedcount(brand)>0, getfieldselection(Brand)); so in your case (you select a brand, the brand is stored in variable, you Change the sheet, clear brand and go back to previous sheet, variable should contain the last brand)

vijetas42
Specialist
Specialist
Author

Hi,

This is also not working,when i come back on first sheet it's clearing all Brands,any other way to achieve the same.

Anonymous
Not applicable

my fault

Definition of "yourvariable"

I forgot else part

=if (GetSelectedCount(FilialNummer)>0, GetFieldSelections(FilialNummer),yourvariable)

I tested it in my app with the trigger select field yourfield and Expression =yourvariable

vijetas42
Specialist
Specialist
Author

Hi,

Yes, It's working fine.Thanks !!!