**WIERD** Field Keeps Value no matter what **HELP PLEASE**

Hi All

I am web enabling a database.

The MainForm has been recreated for the web (MainWebForm) with the original keeping its current format etc…

I have used the Alias MainForm for the MainWebForm and hidden it from Notes and the MainForm is also hidden from the web.

Basically if a form is created in notes or the web then either can be opened on the web or in notes as they both have the same field names etc…

This all works fine.

Problem is i have a status field that is Computed Text. Formula for field is:

@If(statusno=0;“Pending Report Details”;

statusno=1;“Analysis”;

statusno=2;“Pending Review”;

statusno=3;“Pending Approval”;

statusno=10;“Closed”;

“”)

StatusNo field is a Hidden Number Editable field with initial default to 0 that populates via Agents, Scripts etc…

On Initial opening of the mainwebform the Statusno field is 0 so the Status field gets value of “Pending Report Details”

On completion of the webform the Statusno field is set to 1 before any Submit(), Webquerysaves etc…

The Status field does not change value at all it stays at “Pending Report Details”.

I have put the MainWebForm in edit mode verified statusno = 1 and refreshed NO CHANGE

Changed the Status field to editable text field and removed the formula and placed the word “Test” in the value and refreshed the form NO CHANGE

Changed the formula of the status field to something completely different NO CHANGE

Now all the above was also tried by editing and saving the form on the web, The field still kept the original first value.

If i copied the field and pasted it on the form Status_1 this works and i have no issue

If i changed the name of the field then this also works

When i open the MainForm in edit mode (Created as MainWebForm on the web) in the notes client the field contains the First assigned value given, but when i F9 it changes to the correct value.

All other computed text fields on the form work as they should.

We have a team of 3 experienced Notes Developers here and we are all dumbfounded.

The Database was originally created several years ago in R4 and has many modifications in R5 and now R6

Before you ask :slight_smile:

The field is not set for ComputedWhenComposed

The field is not duplicated in the Doc properties (only 1 status field is in the form)

The problem does not exist when the form is created in Notes Client but the status field will not change on any edit and saves on the web but will work in notes.

Stripped all other fields of the MainWebForm and issue still existed.

Any ideas welcome at all on this!!!

Subject: WIERD Field Keeps Value no matter what HELP PLEASE

  1. Are you setting the value of the field by javascript.

As you said, you are resetting the fieldvalue before any formsubmission or webQuerySave…

I wonder if the form Property: “Generate HTML for all Fields” is enabled in your case or not. Because the same thing is working at my end when this Property is enabled.

Subject: RE: WIERD Field Keeps Value no matter what HELP PLEASE

Hi

Statusno is set to 0 on newdoc and is changed by a backend Script agent or javascript. This is done before the form is recalculated/saved

HTML for all fields is enabled.

It is the Status field which is causing me grief as this value does not wanna change no matter what after it is initially set on its first calculation.

For example i could make this field an editable field with no Default value and manually enter text into the field when i create the doc on the web,

I then save and go back into edit the form on the web and replace the text with something different, I then save the form again and the status field will then show the original value i put in there first and not the new one.

Any more ideas out there?

Cheers

Mike

Subject: RE: WIERD Field Keeps Value no matter what HELP PLEASE

Hi,

I already had something which was close to your problem when we migrated of R5 to R6 and yesterday, again, with one computed field which did not calculate anything with a copy of the database and documents…

I did many tests like you, with same results, I did not find an rational explanations…

What I did:

  1. I manually removed the field in the form,

  2. Run an agent on documents with this formula :

FIELD Fieldname := @DeleteField

  1. Refresh database (from Notes Client) : Shift+Ctrl+F9

  2. I recreated the field in form

The field worked correctly…

Why? I don’t know !

HTH

Thierry

Subject: RE: WIERD Field Keeps Value no matter what HELP PLEASE

It sounds like the value is not being saved to the field.