Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
jagannalla
Partner - Specialist III
Partner - Specialist III

Selection issues in the field

Hi,

In my app I've two fields i.e Product and BusinessDate. When app is opened I want to select MinString value of Product and Max value of business date for particular product. I had written open trigger for this. It is working perfectly. I'm display business dates which belongs to particular product in Multibox using the condition. =If(Product=GetFieldSelections(Product),BusinessDate). So that I can see only dates belongs to particular product which I selected.

Now When user selects another product I want to select Max business date in multibox and also user should be able to select another date for same product.

If you observe carefully max dates are different for each product. And the max date of product A is a possible value of product B.

Please find attached app with sample data.

LOAD * INLINE [

    Product, BusinessDate

    A, 1/27/2015

    A, 1/28/2015

    A, 1/29/2015

    B, 1/28/2015

    B, 1/29/2015

    B, 1/30/2015

];

13 Replies
agomes1971
Specialist II
Specialist II

Hi,

please look at the logic of your inline table data.

Product, BusinessDate

    A, 1/27/2015

    A, 1/28/2015

    A, 1/29/2015

    B, 1/28/2015

    B, 1/29/2015

    B, 1/30/2015

Regards

André Gomes

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

I didn't get what you said.

agomes1971
Specialist II
Specialist II

You have different products for the same day...

What is your objective?

André Gomes

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

I'm not sure about the business level functionality. But we had the data in this level and we need solution as I'm expecting.

tresesco
MVP
MVP

Set a trigger on Product selection. Select date field with search string like:

=Date(Max({<BusinessDate=p({1<BusinessDate>})>}BusinessDate),'M/DD/YYYY')

PFA

sujeetsingh
Master III
Master III

Selection Triggers will resolve the need.

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

Hi Tresco,

I went through same solution but expression is different.

my exp: =Date(Max({<BusinessDate=,Product={$(=GetFieldSelections(Product))}>}BusinessDate))  

Your exp and my exp is working perfectly. But the think is we are not able to select dates from multibox.

Eg: for B it is 1/30/2015 is max, later I want to select another date which is possible value for that product. Let say 1/28/2015

Thanks,

Jagan

tresesco
MVP
MVP

I guess if you use BusinessDate field directly (no expression) in the multibox, it works fine.

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

Yes your right, but user want to see only dates belongs to that product only.