Where To Insert Deluge Code

Where To Insert Deluge Code

Hello...

I am brand new to Zoho and I've been handed a project. I am the sole IT Director and IT person at my company so I'm expected to take on any and all IT related projects. They had someone with coding experience in our building engineering department start on a project but they recommended ZoHo and they turned over his work in progress to me. So beyond learning ZoHo and Deluge, I also have to figure out where he left off and where to go from here. 

He started a project in ZoHo Creator where we want to track information on our deliveries but with extra detailed information. 

We have a field called LOAD DATE that we want to automatically populate based upon some line of code in Deluge that keys on the DELIVERY DATE. The Deluge Code looks like this:

  1. if ( input.Miles <= 300 ) 
  2. {
  3. Delivery_Date = subDay(input.Delivery_Date,1);
  4. }
  5. else if ( input.Miles >= 600 ) 
  6. {
  7. Delivery_Date = subDay(input.Delivery_Date,3);
  8. }
  9. else 
  10. {
  11. Delivery_Date = subDay(input.Delivery_Date,2);
  12. }

My main question is...where do I put this code? Do I need to indicate LOAD DATE in this code? And how do I get the field LOAD DATE on my form to trigger off of it?