Good Afternoon,
I have hit a snag in a form that I have been designing for my company. It is essentially a Marketing Workflow chart that takes a job from a drop down list, displays how many days it will take to complete the job, then moves on to the next phase. The drop down list and linear text "1 day, 2 days, ect..." are all working fine. I also have a field named "CurrentDate" which displays the current date, month and year. I have an additional field named DateField, which is where I am stuck. What I am trying to do upon exit of the DropDownList is add the number of days a certain task will take to the CurrentDate and display the new date in the DateField box.
After messing around for a few days, and reading several posts I have come up empty handed. I have not coded in quite some time so this has all been relatively new to me.
I'll post what I have so far below. I've only started the DateField code on the first if statement. Once working, I can move on to the rest:
if (DropDownList1.rawValue == 1){
TextField1.rawValue = "2 Days";
DateField1.formattedValue = Num2Date(Date2Num(DateField1.rawValue, "MM/DD/YYYY") + 2, "DD/MM/YYYY");
}
else if (DropDownList1.rawValue == 2){
TextField1.rawValue = "1 Day";
}
else if (DropDownList1.rawValue == 3){
TextField1.rawValue = "2 Days";
}
else if (DropDownList1.rawValue == 4){
TextField1.rawValue = "2 Days";
}
else if (DropDownList1.rawValue == 5){
TextField1.rawValue = "4 Days";
}
else if (DropDownList1.rawValue == 6){
TextField1.rawValue = "5 Days";
}
else if (DropDownList1.rawValue == 7){
TextField1.rawValue = "4 Day";
}
The text field comes up blank with this code. I have tried several different variations and methods, and the best I can do is get the DateField1 section to come up with "empty". Again, this is new to me so if I am doing something terribly wrong, please let me know.
Thank you,
Chris