Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

OnClose

Hi All,

I have a couple of questions re a couple of variables I have.

I have 2 calendar objects, called start date and end date. These objects are linked to variables which I use in expressions to bring up data within 2 time ranges.

How can I:

1) On open or close of the app clear the selections made, so that when the app is opened, it has no selections

2) Is there an error trapping function in QlikView to say if this expression produces an error value, display this text. I have one particular text box where if I haven't made date selections it says error in expressions, I would like it to say "No Dates Selected" instead. (Current formula is

='Dates Selected:

From '& Date($(vFromDate),'DD.MMM.YYYY')&'

To '&

Date($(vToDate),'DD.MMM.YYYY')    )

3) How do I use "Char" in a text box to manage which text goes on which line?

Thank you

H

3 Replies
Anonymous
Not applicable
Author

1. There is a "Action" called "Set Variable" which could be used to clear variables e.g. OnActivateSheet.

It works generally fine on variables, but if you use the Calendar-object it does seem like that overrides this action and you cannot change a selected date.

One possibility would be to run this in steps so e.g. vToDate is set to vCalToDate (connected with the Calendar object) and then you clean out vToDate.

2. In the Charts > General Tab you have the standard "Error Messages", where you can switch to a custom message.

3. You can work with regular lines breaks within quotes. E.g.

='Here is my first line

Here comes my third line

'&vToDate&'

and some more...'

Kind regards

Niklas

Anonymous
Not applicable
Author

3. Or with CHR(10)... ='Here is some text '&CHR(10)&' and another line.'

antoniotiman
Master III
Master III

Hi Herbert,

you can try set your variable as Date in

Document Property -> Number -> Variables.

So I resolved.

Regards,

Antonio