Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Need a Macro...

Hi,

I'm having a Listbox which has some number of dates. Now i want to select the dates between the Date values(say From Date and To Date) given in input box variables. Could you please help me in writing a macro which access the input box variables(From Date and To Date) and perform necessory action(Selects the dates in listbox between the values given in input box) when i press a button(which is mentioned to run that macro).

Thanks.

2 Replies
Not applicable

Re: Need a Macro...

Dina,

Have a look at the attached application. You can use the selection SelectInField Action to achieve your requirement.

When ever there is change on variable2 this action would excute. You can find this action mapped to the onchange even of the varaible in Document Property-->Trigger-->Variable Event Triggers-->oninput.

Your expresion for selecting the dates in list should be as  ='>='&Date(Variable1)&'<='&Date(Variable2)

Check out the attched working application.

hope this helps you.

- Sridhar


Not applicable

Re: Need a Macro...

Hi Sridhar,

I couldn't open the file you attached. Because I'm not using the licensed version of qlik view. I'm just using the free version provided in qlik view website.

Now I created a Button object and assigned the action as SelectInField and given the Field name as Date in field box and what should i write in Search String space to access the variables in Input box to provide the necessory selection.

I used the expression ='>='&Date(From Date)&'<='&Date(To Date) in search string space but no result i got. So i hope you could help me in this.

Thanks in advance.

Community Browser