Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist II
Specialist II

Display Most recent Note

I need to auto-display a note with NOTE_TYPE = 'TOP' and EXP_TYPE_CODE = 'Capital' for the most recent month as defined by

vCurGLMonth.

I would also like the FISCAL_MONTH_YEAR selection across the stop (7/16, 8/16...) to automatically have the vCurGLMonth selected.

This is not working:

=date(FISCAL_MONTH_YEAR, 'MMM-YYYY') & ' ' &  only({<[NOTE_TYPE] = {'TOP'},EXP_TYPE_CODE={'Capital'}>}NOTE)

Please help.

1 Solution

Accepted Solutions
sunny_talwar

Added a button to for the trigger to work...

Capture.PNG

Created a list box object for FISCAL_MONTH_YEAR and made it always one value selected

View solution in original post

8 Replies
sunny_talwar

Would you be able to give an example of what you would see when you select 08/16 for example?

cbaqir
Specialist II
Specialist II
Author

2-3-2017 8-51-39 AM.jpg

sunny_talwar

I think there is something wrong with your data model..... When I select EXP_TYPE_CODE (Capital)... I still see both capital and Operating note and that is why the Only expression isn't working...

Capture.PNG

Workaround?

=date(FISCAL_MONTH_YEAR, 'MMM-YYYY') & '  ' &  only({<[NOTE_TYPE] = {'TOP'},NOTE={'*Capital*'}>}NOTE)


But you may want to fix the data model

cbaqir
Specialist II
Specialist II
Author

Oops. You are right. Here is the file with the fixed join. I still am trying to figure out how to automatically display the note associated with the vCurGLMonth.

sunny_talwar

This?

=date(Only({<TRX_DATE = {"$(=vCurGLMonth)"}>}FISCAL_MONTH_YEAR), 'MMM-YYYY') & '  ' &  only({<[NOTE_TYPE] = {'TOP'},EXP_TYPE_CODE={'Capital'}, TRX_DATE = {"$(=vCurGLMonth)"}>}NOTE)

cbaqir
Specialist II
Specialist II
Author

Halfway there. Thanks. 2 more questions...

So the note populates but how do I show the month/year selection at the top with the vCurGLMonth?

This isn't working as a document trigger:

Also, how can I restrict the month selections to only allow one month to be selected at a time? My calculations won't work if multiple months are selected  -per the requestor's design.

sunny_talwar

Added a button to for the trigger to work...

Capture.PNG

Created a list box object for FISCAL_MONTH_YEAR and made it always one value selected

cbaqir
Specialist II
Specialist II
Author

Thanks. I was using an expression for my date list box so the Always Select One Value option wasn't there.

Thanks for the right trigger syntax =Only({<TRX_DATE = {"$(=vCurGLMonth)"}>} FISCAL_MONTH_YEAR)