Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
gauthamchilled
Creator
Creator

MAX YEAR

i have a listbox..

Year

FY2015

MY2015

FY2014

MY2014

I WANT TO CREATE A TRIGGER TO SELECT LATEST OR MAX FIELD FROM THIS LISTBOX..

HOW CAN I  CREATE AN EXPRESSION FOR SELECT IN FIELD TRIGGER TO SELECT MAX YEAR

21 Replies
Chanty4u
MVP
MVP

I think text is not taking as a Year field

we need  give  text before the exprssion ?

martinpohl
Partner - Master
Partner - Master

see attached file.

Change the trigger from button to docuement properties / triggers.

But remeber:

OnOpen

Select this event to assign an action to be executed each time the QlikView document is opened. This event is not supported when running in the AJAX client.

find here:

Document Properties: Triggers ‒ QlikView

Regards

gauthamchilled
Creator
Creator
Author

YOUR SOLUTION ALWAYS PICKS fy NOT MY..IS IT?

gauthamchilled
Creator
Creator
Author

WHAT IF I ADD MY2016..STILL IT TAKE MY2016 AS MAX?

settu_periasamy
Master III
Master III

You should give '*'

='*'&Max(Right(Year,4))

tresesco
MVP
MVP

Check this :

=If( Index(Concat({<Year={'*$(vMaxYear)'}>}Year), 'FY'), '*FY'&vMaxYear, '*MY'&vMaxYear)

Though I believe there would be an easier expression which is not just striking in.

Kushal_Chawda

see this, create 3 Variables

now check the OnOpen trigger

Kushal_Chawda

Yeah settu, you are correct, but what if FY and MY both have 2015, in this case it will select FY and MY 2015, but what he wants is FY 2015

settu_periasamy
Master III
Master III

Ok Kush141087. I'm getting bit confused.

🙂

Kushal_Chawda

settu_periasamy

IF you have FY2015 & MY2015 (considering 2015 is max) both in Year field, then by using what you have suggested both FY2015 & MY2015 will be selected on opening application. I think what he wants is only FY2015 should be selected