Updating check box value dynamically in Word document

Hi Awais,
I need to update check box dynamically. However, I cannot use the above code, as it iterates all the available checkbox fromt he document and updates it.
I need to update specific check box with placeHolder, I mean, i need to update the checkbox in a table cell, based on the value of first Cell in a row.
I can iterate the table and fetch values, however, unable to update it.
I use below code to update the checkbox and it does not work.
Please assist.

FormField formFieldCollect = null;
for (Object paragraphChildNode : paragraphChildCollection) {

												 if(paragraphChildNode instanceof FormField){
													 isCheckBox = true;
													 isCheckBoxRow = true;
													formFieldCollect = (FormField)paragraphChildNode;
													chkContent.put("content",formFieldCollect.getText());
													checkBoxName = formFieldCollect.getName();
													checked = Integer.parseInt(formFieldCollect.getResult());
													chkContent.put("chkBoxId", formFieldCollect.toString());
													chkContent.put("Name", checkBoxName);
													chkContent.put("checked", checked);
													checkBoxDetailsJsonObj.put(chkIndex, chkContent);
													//yesChkBoxAdd = true;
												
													
													
													
												}/*else if(paragraphChildNode instanceof FieldFormCheckBox){
													FieldFormCheckBox fieldformChbkCollect = (FieldFormCheckBox)paragraphChildNode;
												}*/else if(paragraphChildNode instanceof Run){
													
													Run r = (Run) paragraphChildNode;
													String booleanYesNo = r.getText();
													if(booleanYesNo.equalsIgnoreCase(flagName1)){
														if(formFieldCollect != null){
															formFieldCollect.setEnabled(true);
															formFieldCollect.setChecked(true);
															formFieldCollect.
															
														}
														
													}
													if(yesChkBoxAdd){
														chkContent.put("Flag",booleanYesNo);
														checkBoxDetailsJsonObj.put(chkIndex, chkContent);
														chkContent = new JSONObject();
														chkIndex++;
														yesChkBoxAdd = false;
													}
												}
											}

Regards,
Mamtha.A.C.D.

@HAREEM_HCL_COM,

Please ZIP and upload your input Word document along with a screenshot highlighting the check box that you want to update here for testing. We will then investigate the issue on our end and provide you more information.