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.
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.
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.
“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.