Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8339 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello Everyone:

I have a little experience in scripting, but I am not to good at calculations, and what functions to use. Here's my problem:

Basically, I am trying to set a field to a certain date based on a radio button that is clicked.

I have a value list field with 7 values in it. They are:

2 Month Contact

3 Month Contact

4 Month Contact

5 Month Contact

6 Month Contact

9 Month Contact

12 Month Contact

Then I have a date field called Projected Contact Date.

If the 2 Month Contact button is clicked today, I want the Projected Contact Date field to read March 25, 2002. I also would like the same action to happen if the other radio buttons are clicked (except the date would read May 25, 2002 and so on)

I tried to make the Projected Contact Date field a calculation field, but I have no experience here. And I know this forum is very helpful. At first I made a script that had a group of If statements to fill the field, and it worked fine but I had to have an extra button to activate the script. If someone could help me with the calculation for the field, that would be very helpful.

Thanks all for helping if you can!!

If there are any questions, please ask and I will post promtly.

Posted

Assume you have a field called "last_app" which is the date from which the next appointment is made. You have a field "next_app_period" which has the value list result.

Create a calculation field called "next_app_period_num" which converts the text to a number of months:

Case(next_app_period = "2 Month",2, next_app_period = "3 Month", 3, next_app_period = "4 Month",4,next_app_period = "5 Month",5,next_app_period = "6 Month",6,next_app_period = "9 Month",9,next_app_period = "12 Month",12,0)

Now create a calculation field "Projected Contact Date":

Date(Month(last_app)+next_app_period_num,Day(last_app),Year(last_app))

This will give you the date for the next appointment.

Hope this helps.

Garry

This topic is 8339 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.