for (i = 0; i <= 4; i++) { // This line gets a value from the detail line. I assume you would get the req# field // based on information contained in the detail line. myDMEInputField = lawForm.getDataValue("MY_EXISTING_DETAIL_LINE_FIELD",i); // Then do the DME call here using the value in myDMEInputField as input. getReqNumber // is a function name I made up that would contain the DME call that returns your request number. myREQNbrReturnValue = getReqNumber(myDMEInputField // Once you have the return value from your DME call, place it in the field you added to // to the detail lline. In the line below, "text7" is the text box you added to the detail line to // hold the Req#. lawForm.setFormValue("text7",myREQNbrReturnValue,i); } If you only want to retrieve the req# when the user clicks on a detail line you'll have to tie it to an event such as when they leave a text field in the detail line. The TEXT_OnBlur(id, row) function will have a value in the "row" variable if the text box is in a repeatable section such as a Detail Area. So if the field you were using to trigger the DME call was "text2", you would obtain the value of the field for that line using lawForm.getFormValue("text2",row);