Auto populated fields and calculation


If someone could help me with an this request, it will be greatly appreciated. Basically, what I'm trying to accomplish is for when a staff member Selects a month (Period), the total hours available for that month auto populate. I can create a separate list or column for the months. Also, when they enter the hours, I'd like for the value in Total Hours field to be subtracted from the Total Hours Available in month. Finally, if they go over the Total Hours Available I'd like for them to receive a pop up saying that they have used up all the allowed hours for the month.

Hello @jvaldivia,

Welcome to Plumsail Community!

total hours available for that month — is it a fixed value for the month?

If so, you can create a separate list that stores data for all months. In the main list create a lookup column that points to month name, and then get available hours as extra fields value.

You can show a alert box if the user has exceeded the allowed number of hours in a month:

    fd.field('Hours').$on('change',function(value) {
         if(value > fd.field('TotalHours').value){
             alert('alert text');

I was able to add the extra field but I'm having a hard time with the JS code. I'm not sure what to enter.

The separate list that stores all data for the month has a column named Month, and the other named Hours



Have you added a lookup column to the form to select the month?

On what step you are now? I need more details so I could help you with the code.