Try below javascript on initialize event of fieldname,
xfa.resolveNode("filedname.caption.value.#text").value = "new caption";
Hope this helps.
Try below javascript on initialize event of fieldname,
xfa.resolveNode("filedname.caption.value.#text").value = "new caption";
Hope this helps.