Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can't get Document Trigger to work.

I know it's me... it always is!

I have a variable that I have created to give me the maximum year in which there has been data entered. (There is a similar fomrula for max week in the selected year also.)

In my example, I am analysing weekly production, and I define the variable MaxYear as:

Max (TOTAL If(IsNull([Litres Produced]),Null(),[Year]))

I am trying to use this as a Document Trigger so that the year will be automatically selected on opening te document.

This then (I hope) allows Only(Year) to work without the user being required to select a period.

So I have selected the "Triggers" tab in Document Properties, there selected the Document Event Trigger "OnOpen", chosen the Action "Select in Field", selected the field "Year" (no quotes) and entered the formula above as the Search String.

I expected this would do what I wanted, but it appears to do nothing at all.

As usual... help please!

Dave

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Have you tried with = sign before your expression.

     =Max (TOTAL If(IsNull([Litres Produced]),Null(),[Year]))

     Or

     =Max(Year)

Hope it helps

Celambarasan

View solution in original post

4 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Have you tried with = sign before your expression.

     =Max (TOTAL If(IsNull([Litres Produced]),Null(),[Year]))

     Or

     =Max(Year)

Hope it helps

Celambarasan

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

=Max(YearFieldName)

This will always select the Latest year based on the selection.

If you want to get the max ever irrespective of selections then use

=Max(ALL YearFieldName)

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Thanks Celambarasan,

It was as simple as "=" before the expression.

(Not needed before the field name.)

Muchas gracias!

Not applicable
Author

Thanks Jagan,

I appreciate your time and input.