Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Actual year and month selected by default on a view of Qlikview

Hello, My name is Natacha De la Rosa, I'm from Dominican Republic and i'm beggining to develop with qlikview.

So this is my question, I have a view that is displayed by year and month, and I want to put by default selected the actual year and month. Is that posible? and if the answer is yes. How can begin with that?

Tags (2)
1 Solution

Accepted Solutions
Not applicable

Re: Actual year and month selected by default on a view of Qlikview

I did the example with your month = MonthNames (describe in the script beginning)

1Open the script

2 add that in the script (anywhere):

let varYear =year(today());

let varMonth= Month(today());

3Save and close your script.

4Go in Settings -> Document properties -> Triggers.

5 click "On Open" in  Document Event Triggers

6 click "Add action(s)"

7  click "Selection" in Action Type and "Select in field" in action

8 Click "ok"

9 Type your year field name in Field and "=varYear" in Search String

10 click "Add action(s)"

11click "selection" in action type and "select in field" in action

12 click "ok"

13 Type your year field name in field and "=varMonth" in Search string

14 click "ok" and "ok",

15 save and close the application

16 open it.

Is it working/ For yhe year? the month?

If it's not working for the month, could you give me the format month?

16 Replies
MVP
MVP

Actual year and month selected by default on a view of Qlikview

You can set 2 Variables for the current Year and Month in the Load Script, and then create Actions to select those values in the corresponding Fields upon opening the document:

Open "Settings" - "Document Properties" - Triggers.

Find the event "OnOpen" and enter the Actions editor. In the actions, pick "Select in field" and fill out the Field name and the Value (coming from the Variable).

This might be a bit too much for a beginner...

Not applicable

Actual year and month selected by default on a view of Qlikview

Hi, Nice to meet you.

Yes it's possible. If you want a static solution it's really simple. You just need to select the month and the year. Save and close your application. When you open it again, the selectin stay. Qlikview open the application with the selection saved.

Do you need a dynamic solution??

Not applicable

Re: Actual year and month selected by default on a view of Qlikview

Oleg Troyansky, thanks for answer, could you explain me a little more simple, like I write before, i'm beggining so could you help me at this point please.

EvaPOLINI, thanks for answer, I need a dynamic solution for this, What you recommend me?

Not applicable

Actual year and month selected by default on a view of Qlikview

Who?

Not applicable

Re: Actual year and month selected by default on a view of Qlikview

who could guide me with this?

Not applicable

Actual year and month selected by default on a view of Qlikview

Can I do this with javascript and if the answer is yes, how can I do it?

MVP
MVP

Actual year and month selected by default on a view of Qlikview

Natacha,

you might require a bit more detailed support than this forum is built for... We usually show you the right direction...

What part of the solution do you need help with?

Setting the variables in the script:

let vCurrentYear = year(today());

let vCurrentMonth = Month(today());

I described the rest in my previous post

best,

Oleg

Not applicable

Re: Actual year and month selected by default on a view of Qlikview

I did the example with your month = MonthNames (describe in the script beginning)

1Open the script

2 add that in the script (anywhere):

let varYear =year(today());

let varMonth= Month(today());

3Save and close your script.

4Go in Settings -> Document properties -> Triggers.

5 click "On Open" in  Document Event Triggers

6 click "Add action(s)"

7  click "Selection" in Action Type and "Select in field" in action

8 Click "ok"

9 Type your year field name in Field and "=varYear" in Search String

10 click "Add action(s)"

11click "selection" in action type and "select in field" in action

12 click "ok"

13 Type your year field name in field and "=varMonth" in Search string

14 click "ok" and "ok",

15 save and close the application

16 open it.

Is it working/ For yhe year? the month?

If it's not working for the month, could you give me the format month?

Not applicable

Re: Actual year and month selected by default on a view of Qlikview

Hello, I tried the example that you give me,works with the year but the month doesn't work, the month format is numeric.

Community Browser