Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ashok1203
Creator II
Creator II

Issuing on Triggers

Hi All,

I have two data island tables in my data model. In that tables i have a 'ID' field in Table1 and 'Number' field in the Table2. Both are different. some of the data are matching. I have given a trigger for auto selection of these two values.

For Example if i select ID value as 1 then it will selects the Number value 1 in Table2. This is working fine for me. But if i select the ID as 5 that value is not there in the Number Field i.e. Table2. On that case the all the data is showing in Table2. But as per the requirement, in that case i need to show only the Empty report instead of showing all the data in table2 ( only headers as report).

Can any one please help on this.

AAK
1 Solution

Accepted Solutions
sunny_talwar

Check this out:

If(GetSelectedCount(ID) > 0,

If(Count(TOTAL Aggr(Sum({<Number = P(ID)>} 2), Number)) > 0, Sum({<Number = P(ID)>} 2), Sum({<Number = P(ID)+{'-'}>} 2)), 2)

View solution in original post

19 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

add to the report/table

a calculation condition the says

getselectedcount(NumberField)>0

that way only if you selected values the expressions in the table will be calculated

ashok1203
Creator II
Creator II
Author

Hi,

I tried to workout the same. As per the Requirement, If no matching field is available then we need to show the report  with headers. But in this case the entire report will goes to hide and By Default we want to shows all the data

AAK
ashok1203
Creator II
Creator II
Author

Can anyone help me on this.

AAK
sunny_talwar

Would you be able to share a sample of what you have?

ashok1203
Creator II
Creator II
Author

It is difficult to share the application. For your reference i will create one sample application and share across the same.

AAK
sunny_talwar

Ya that's what I am looking for. Thanks!!

ashok1203
Creator II
Creator II
Author

Hi Sunny,

Attached the Sample application. In that if you select ID values from 1 to 5, In 1st table and 2 nd table you will get the values according to the selection. But If you select 11, 12 then in table2 we are getting all the data. I dont want to see all the data, Just null data with the hearders in that case.

Please help me.

AAK
sunny_talwar

Can you see if the without trigger option works for you?

ashok1203
Creator II
Creator II
Author

Hi,

Thanks for reply. I want it dynamically. for example if the user selects one ID, we need to show the same in Table2. Sometimes, they will select multiple.That time also we need to show as per their selection. By default we need to show all the data.   So, this will not satisfy the requirement. can you please suggest me any other method.

AAK