0

Autofill due date based on date of interview.

I want to set a trigger (I believe a trigger, maybe formula?) that automatically calculates the due date based on the interview date.  The due date will always be the Friday of the week following the interview.  Can someone please assist?  Greatly appreciated!!

5 replies

null
    • Ninox developer
    • Fabio
    • 5 yrs ago
    • Reported - view

    Hello Kari. This could be a possible solution that you can put in trigger after update in the "interview date":

    'due date' := switch weekday('interview date') do
    case 0:
      'interview date' + 11
    case 1:
      'interview date' + 10
    case 2:
      'interview date' + 9
    case 3:
      'interview date' + 8
    case 4:
      'interview date' + 7
    case 5:
      'interview date' + 6
    case 6:
      'interview date' + 5
    end

     

    Fabio

    • Kari.1
    • 5 yrs ago
    • Reported - view

    Thank you for responding.  I am still trying to learn this and don't understand coding.  My question is do I need to replace case 0, case 1 .... to something in particular or should this work as written in your response?  Does this trigger go in the interview date or in the due date field?  Sorry for all the questions--I can't seem to get it to work and I am sure it is something I am doing wrong.  Thank you for your assistance and patience!

    • Nick
    • 5 yrs ago
    • Reported - view

    Don't replace anything.

    Fabio told you what to do:  put in trigger after update in the "interview date".

     

    *Just the two fields in your table must be: Interview Date and Due Date.

    • Kari.1
    • 5 yrs ago
    • Reported - view

    Thank you--I will try again. 

    • Kari.1
    • 5 yrs ago
    • Reported - view

    It works great--thank you.  I had made a naming issue on my end that interferred.  Thank you again for your patince with this newbie.  

Content aside

  • 5 yrs agoLast active
  • 5Replies
  • 1470Views