Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Help please...Working with variable from input-box to list-box.

Hi all,

I have created a variable called MoreThanHrs from a input box.

I have two listbox showing staffNames and workingHours.

What can i do to make it such that whenever the user entered a value into the input-box (for.eg. 11), it will then select out workingHours that is equal or greater than 11:00, and thus showing the staffNames who has worked this amount of hours.

In addition, how can i set the default value of the input-box? meaning everytime i clear selectd fields, the input-box value and MoreThanHrs value will set back to 0?

Please help... kinda urgent.

Thanks,

10e5x

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Help please...Working with variable from input-box to list-box.

Try this as search string:

='>=' & Interval($(MoreThanHrs)/24,'hh:mm')


talk is cheap, supply exceeds demand
8 Replies
Not applicable

Re: Help please...Working with variable from input-box to list-box.

go to document properties -> trigger -> variable event trigger ->on change

and create an event like:

select in field

field:staffNames

search string : ='>$(MoreThanHrs)'

Not applicable

Re: Help please...Working with variable from input-box to list-box.

Hi Pari,

thanks for your reply, after so long, finally some1 responded. I am currently out of office will be able to test it tml. Just asking how to assemble the syntax to more than for e.g

user input = 3 for the vairable MoreThanHrs

but due to the values in my fields are in hh:mm format, hot should i alter the syntax to make it more than 3:00?

Thanks alot

Regards,

10e5x

Not applicable

Re: Help please...Working with variable from input-box to list-box.

you can modify search string by adding maketime() function

it will be easier to mr if you send small sample file so i will prepare complex solution

Not applicable

Re: Help please...Working with variable from input-box to list-box.

Hi Pari,

The attached is a sample file u may work on. What i am trying to do is to know the working hours of the staff, and derive who are the one working more than x hours in that selected day and which are the workers who works Y consecutive days.

The qns i posted here is trying to solve the first issue, obtaining workers who work more than x hours in the selected day. As for the second problem, i am still stuck with the counter.

My tables are very messy, as i do not have rights on db, and these are what i tried to extract and load.

Thanks, i hope u really can help me. Really need your help.

Greatly appreciated,

10e5x

MVP & Luminary
MVP & Luminary

Re: Help please...Working with variable from input-box to list-box.

Try this as search string:

='>=' & Interval($(MoreThanHrs)/24,'hh:mm')


talk is cheap, supply exceeds demand
Not applicable

Re: Help please...Working with variable from input-box to list-box.

Hi Gysbert,

Once again its you that are helping me. Thanks again. Btw i tried both of your search string it doesnt works.

Let me list down my steps:

1) Settings > Document properties

2) At the Variable Event Triggers, On Change section i clicked 'Add Actions'

3) Clicked 'Add' again

4) Action type: Selection

    Action: Select in field

5) Under the field box i enter: StaffName

6) Under Search String box i enter: ='>=' & Interval($(MoreThanHrs)/24,'hh:mm')


However when i change the values, nothing changes.

Further advice please.

Thanks,

10e5x

Not applicable

Re: Help please...Working with variable from input-box to list-box.

Hi Pari,

How to do a makeTime() function? Btw i followed your steps as such:

1) Settings > Document properties

2) At the Variable Event Triggers, On Change section i clicked 'Add Actions'

3) Clicked 'Add' again

4) Action type: Selection

    Action: Select in field

5) Under the field box i enter: StaffName

6) Under Search String box i enter: ='>$(MoreThanHrs)'


However when i change the values, nothing changes.

Further advice please.

Thanks,

10e5x

Not applicable

Re: Help please...Working with variable from input-box to list-box.

Hi i works, after changing the fieldname to WorkingHours. Now i got most of the required field up, i am going to first create a flow for my program then followed by.

Btw any of you know how to set the default value of more than hours to 0? Cuz it doesnt look nice even before the user input any value, the value is 3 or 21, 12 etc...

Thanks pari and gysbert

Regards,

10e5x

Community Browser