ActPresentation.com HOME FAQ FORUM info@ActPresentation.com
Phorum: speed & power.

ActPresentation.com


Add-ons for Sage ACT! CRM

ACT! addons by ActPresentation.com : Abacus Calculated Fields, PicturePlus, Quick Navigation List, Employment History, Quick Search, Presentation for ACT!

Clearing Fields

Posted by: JordanAustin

Date: September 15, 2008 03:40PM

Hello,
I'm trying to figure out a way to have a check box clear one field and add a date to another field.

So when 'checkbox_1' = 'true' I would like 'date_field_1' to clear its value, but 'date_field_2' would take todays date. Then if 'checkbox_1'goes back to = 'false' then 'date_field_2' to now clear its value.

Any ideas?

Thank you for your help in advance!

-Jordan Austin

Re: Clearing Fields

Posted by: JordanAustin

Date: September 17, 2008 11:25AM

I have been able to make this work by adding another date field I have hidden it on another layout page. Heres the formula I used, incase you want to use it OR if someone has a better idea for this.

I have 4 fields: "due_BY_date", "received_checkbox", "received_ON_date" and "blank_date"
__

"due_BY_date" has this formula:
IF [received_checkbox] = '1'
THEN [blank_date]
End
__

"received_ON_date" has this formula:
IF [received_checkbox] = '0'
THEN [BlankDateField]
ELSE GETDATE()
End
__

If you have another idea on how to make this work I'm definitely interested.

Thanks

-Jordan

Re: Clearing Fields

Posted by: Admin

Date: September 27, 2008 05:49PM

Every time you want to put empty value in any field you can use the NULL keyword
So instead of using artificial field [BlankDateField] you can use NULL

IF [received_checkbox] = '0'
THEN NULL
ELSE GETDATE()
End

Or you can rewrite this formula without ELSE clause :


IF [received_checkbox] = '1'
THEN GETDATE()
End

Conditional formula without ELSE clause implies ELSE NULL

Re: Clearing Fields

Posted by: Admin

Date: September 27, 2008 05:51PM

JordanAustin Wrote:
-------------------------------------------------------
> Hello,
> I'm trying to figure out a way to have a check box
> clear one field and add a date to another field.
>
> So when 'checkbox_1' = 'true' I would like
> 'date_field_1' to clear its value, but
> 'date_field_2' would take todays date. Then if
> 'checkbox_1'goes back to = 'false' then
> 'date_field_2' to now clear its value.
>
> Any ideas?


formula for [date_field_1] :


IF( [checkbox_1] = 1 ) THEN
NULL
ELSE
getdate()
END


*************************


formula for [date_field_2] ( reverse THEN-ELSE ):


IF( [checkbox_1] = 1 ) THEN
getdate()
ELSE
NULL
END

-------------------

ACT! software CRM addons - best plugins for ACT contact management software ( Act! by Sage software : ACT!2005, ACT!2006, ACT!2007, ACT!2008, Act by Sage Premium for Workgroups ).
Custom addon solutions ( ACT! add ons ) development and CRM (Customer Relationship Management) software training and consulting.