Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Gysbert_Wassenaar

Try this as search string:

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


talk is cheap, supply exceeds demand

View solution in original post

8 Replies
Not applicable
Author

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
Author

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
Author

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
Author

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

Gysbert_Wassenaar

Try this as search string:

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


talk is cheap, supply exceeds demand
Not applicable
Author

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
Author

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
Author

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