Normal Topic [Solved] Ability to override programming (Read 624 times)
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
[Solved] Ability to override programming
Jan 16th, 2008 at 4:38pm
Print Post Print Post  
Have a simple problem that I can't seem to find (or create) a solution for...
There are two fields in question "efdt1" and "exdt1" respectively. When I add a date in the first field I have code that echoes a date in the second field that is 365 days greater than the date in the first.

The code is simple as follows:

IF @DOM(EFDT1)=@DOM(EFDT1+365) THEN {EXDT1=EFDT1+365} ELSE {EXDT1=EFDT1+366}

I would like to be able to allow the user to change the date in the second field (exdt1) to whatever they like if the term is less than a full year.

The way it works now is that if we change the date in exdt1 to something other than +365 the info will show in the field until we print the document...then the printed doc shows the date as effdt1+365.

I'd appreciate any tips or suggestions any may offer...

Thank you...

Cliff
« Last Edit: Jan 16th, 2008 at 8:55pm by Hammer »  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Ability to override le's that contain programm
Reply #1 - Jan 16th, 2008 at 7:17pm
Print Post Print Post  
How about only setting the date in the 2nd element if it's blank?

This way, the user can change it, and it will stick; or the user can let it recaculate the date for them by deleting the value in that 2nd element.

Code
Select All
If @IsBlank(EXDT1) = 1
{
  IF @DOM(EFDT1)=@DOM(EFDT1+365) THEN {EXDT1=EFDT1+365} ELSE {EXDT1=EFDT1+366}
} 

  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
Re: Ability to override le's that contain programm
Reply #2 - Jan 16th, 2008 at 8:44pm
Print Post Print Post  
Thanks Carl...we'll give this a whirl and let you know how we do...
Again...Thanks...
  
Back to top
 
IP Logged
 
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
Re: Ability to override le's that contain programm
Reply #3 - Jan 16th, 2008 at 8:47pm
Print Post Print Post  
Thanks Carl!
Success!
Much obliged...

Cliff
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: [Solved] Ability to override programming
Reply #4 - Jan 17th, 2008 at 4:35pm
Print Post Print Post  
You're welcome.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged