6 Replies Latest reply: Jul 22, 2012 1:55 PM by Niall O'Donovan RSS

    Add a change event to prompt a function return different result

    mdjco Community Member

      I have a change event in a drop down list, DDL_1, that calls a function from my variables. This DDL_1 returns a value to a text box, Text_1, that I use to calculate time. Inside this change event in DDL_1 I have a conditional statement that is based on user input from a date field, Date_1.

       

      My issue is that I need the text box to update/change when I change the value in Date_1 and not just in the DDL_1. I can get the proper value if I change Date_1 and then choose a different value in DDL_1 and select the initial value again, but I'd like the data in Text_1 to automatically change whenever either fields are changed. I suspect there is some capability with the change event of Date_1 but I thought maybe there was a very simple command I could insert and wanted to go to the experts for best practice.

       

      The code in the change event of DDL_1 follows this psuedo-code format:

       

      if(Date_1 > somedate && Date_1 < someotherdate){

      execute function with certain data

      }

      else{

      execute function with different data

      }