Hi all, I'm still fairly new with web2py and what to get something working but i got stuck.
i have 2 tables who are prefilled with data and a form where a user can give imput,. I would like to use the imput of the user and select the right field in a different table to get the correct price and use that for a calculation. example data to work with: First dataset Part of day From: Until: Night2 0:00 7:00 Day 7:00 18:00 Evening 18:00 23:00 Night1 23:00 0:00 second dataset Job A *normal (1)* *weekend (2)* *holiday. (3)* Day 22,15 23,30 23,30 Evening 23,30 25,10 25,10 Night1 11,85 13,15 13,15 Night2 25,65 26,70 26,70 When a user fills in a form where they have to fill in a workday with start-datetime and end-datetime i would like to compare the start-datetime and end-datetime with the first and send table to define how many hours a specific person ( in a specific job) has worked is a specific part of day and multiply that with the correct number. for example: if someone works in Job A and works 2 hours during day ( between 07:00 and 18:00 ) and that day was in the weekend i would like to have a calculation in a table with value: 46,60. I know how to setup the three tables but how to compare user input with 2 different tables and write the outcome to the same table where the userinput is stored. IHope someone can point me in the right direction steve -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

