How to make a smart icon delete a specific item from a selected doc with @Formula

I would like to code a smart icon using @Formula that would accept an item name as an input and then delete that item from the selected document. This is the code I am using:
REM {Prompt for which item needs to be removed.};
        delField := @Prompt( [OkCancelEdit] ; @DbTitle + " - " +
@ViewTitle ; "Enter the name of the item you wish to remove."; "" ) ; delField = "" ); FIELD delField := @Unavailable;
On running the code, I realized that instead of deleting the item that is keyed in by the user and stored in the variable "delField", the code is actually trying to delete an item named "delField", which it does not find and hence the code does not work as intended. This can be easily achieved using LotusScript. Is there an easy way to do this in @Formula Language?
This code works for me in ND6:
fieldName := @Prompt([OkCancelEditCombo]; "Field Name"; "Enter Field
Name."; ""; @DocFields); @If(fieldName = ""; ""; @SetField(fieldName ; @Unavailable))
However, I'm afraid it might not work in R5. If it doesn't, there's not a way to do what you are asking.
This was first published in February 2005

Dig Deeper on Lotus Notes Domino Formula Language

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...