Permanent field deletion

Hello,

I been looking in the web and in the Notes Help about how to delete/remove fields in a form. But any page mentions what I need. I need to remove completely the field “Title”. Not just the information on it, the complete field.

I have these lines:

Call parentdoc.RemoveItem(“Title”)

Call parentdoc.Save( True, True )

But this one doesn’t remove the fields, just the information on them. I don’t want those fields any more in the form. I saw something regarding fields call “ghost” but this one is not the case because these are existing fields that I need to remove just when the users click and action button.

When I run the Debug I can see the field is removed from the list but it is not true. They came back after the Debug.

Can someone help me? Please

Subject: Permanent field deletion

Sofia,

As fas as I have seen the removeitem method will delete the field from the backend document as long as you have the right to modify the document of course.

But in your code you have parentdoc.RemoveItem.

So this parentdoc makes me wonder where the upper code is…

Because if this code is in form used in a dialog box, look at the parameter you use to open the dialogbox. Especially this one :

noFieldUpdate

Boolean. Optional. Specify True if to not pass any edits from the dialog box to the underlying document (for example, if you’re passing the edits somewhere else in a Queryclose script for the dialog box form). Otherwise, the edits are passed to the underlying form.

If not set to true, the fields in the “parent document” of the dialogbox will be updated when the dialogbox is closed, so the field “Title” will be recreated after you remove it.

I’m not sure it’s your problem though…

Hope this helps

Renaud

Subject: Permanent field deletion

If you are opening the document and form contains the field then you will see the field in the properties with no value in it.

Look for the field in document properties at view level.

Subject: RE: Permanent field deletion

Hi,

I checked if the field still there using the Doc Properties box and I can see it.

I just run the agent again. The information is not there but the field still there. I need both to be removed.

Subject: RE: Permanent field deletion

Hi

First check if the field is still on the form. Then create a new agent with the @Formula:

FIELD Title := @DeleteField;

And run this agent on all documents of which you want this field to be deleted.

Regards

Subject: RE: Permanent field deletion

Thank you Harry,

The button is doing a lot of thing not just the remove field action. The button check child documents, refresh information, etc. So I can’t use @formulas because all the code is in lotusscript.

Subject: RE: Permanent field deletion

“refresh information” - Do you do a ComputeWithForm somewhere in that refreshing of information? It would definitely put the field back on the document for you.

/Peter

Subject: Permanent field deletion

You need a tool called Designer to make changes to design elements such as forms.