Conditionaly Change Values in diferent field

I’m tring to document when a incident report gets closed, who closed it and when.

I’d like to populate the fields closer, and closed_date when a user checks a radio box named closed.

I’de like the values:

@username for “closer”

@now for “closed_date”

I’d like to clear the values if the box is unchecked.

I need a bit of help with the code for the onchange event in the “closed” properties.

this is a notes client only application.

Thanks for the help in Advance

Jim Lamb

Subject: Conditionaly Change Values in diferent field

That almost worked.the problem is that if another field is changed that has the refresh flag set, it updates again.

I only want it to update when the “closed” field is changed so that I know who closed the incident and when it was closed.

I assumed I’d need to modify an event for the closed field.

I need to know what event would be best to use and the code that belongs in there.

Subject: RE: Conditionaly Change Values in diferent field

Hi James,

It would be much easier if you set your closed field by way of an action button… then you could simply make the closed user and time fields set in the same action button and be done with it. If you must do this with a check box field then try this.

Assume ‘closed’ is the name of the checkbox. And the value ‘closed’ is what is chosen to check off when the document is closed.

Closer Username (text or names field)

Computed to:

@If(closed!=“closed”;“”;@ThisValue!=“”;@ThisValue;@Name([CN];@UserName))

Closed Date (date/time field)

Computed to:

@If(closed!=“closed”;“”;@ThisValue!=“”;@ThisValue;@Now)

That ought to do it… but really consider setting this using a button instead then the fields are just computed to themselves and you can use @SetField in the action button.

Cheers,

Mark

Subject: Conditionaly Change Values in diferent field

  1. Make both fields computed2. Set “refresh fields on keyword change” on the radio button

  2. In the Closer field enter:

@If(closed =“” ; “” ; @Name([CN] ; @UserName))

  1. In the Closed date field enter:

@If(closed =“” ; “” ; @Now)