Skip to Main Content
HCL Domino Ideas Portal

Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.

For more information and upcoming events around #dominoforever, please visit our Destination Domino Page

Status Needs Review
Workspace Domino Designer
Created by Guest
Created on Oct 28, 2021

Domino Access Services: JSON required to remove an item within a PATCH request

Request for means to delete an item/field from a document via JSON in a PATCH request.


The current workaround below is quite convoluted so we'd like for a better approach:


A. For example, test document has "value1" field on the Form with the following formula: @Text(@Created)


B. Create a new Form just for REST client's APIs compute against for this specific purpose.

The Form, for this specific example, would make the Value1 to be an editable field with no formulas of any kind. Let's call this Form 'Test1' while the original Form (document) is called 'Test'.


You'd have ValidateFields only on the new 'Test1' form:

FIELD value1 := @If(Value1=""; @DeleteField; Value1);

@Success


C. You'd execute 2 requests to achieve the results you're after:


1) PATCH http://mytest.com/test.nsf/api/data/documents/unid/6964E86DC3A14E6A852587790003FBE4?computewithform=true&form=test1

BODY: raw JSON

{

"value1":""

}


Note the form=test1 param in the URL. Follow the above request with,


2) PATCH http://mytest.com/test.nsf/api/data/documents/unid/6964E86DC3A14E6A852587790003FBE4?form=test

BODY: raw JSON

{

}


Note the form is being reset to "test" via URL params since the first request had set it to 'test1'

  • Attach files