Hi Somjit,
Attach the related collection into your web interface and include below code sample in js widget.
//Set user id field value - hardcoded
id_user_id.setValue("1234");
function list_ok(result) {
alert("ok=" + JSON.stringify(result));
alert("ok=" + JSON.stringify(result[0].id));
//Set Field value - from collection
id_user_id.setValue(JSON.stringify(result[0].id));
}
function list_ko(result) {
alert("ko=" + JSON.stringify(result));
}
var my_pattern = {};
my_pattern.mailId = "
a...@gmail.com";
col_testColl.listCallback(my_pattern,{},list_ok,list_ko);
If you need to populate multiple field values, it is recommended to build a CAPI which returns collection values and call it in above.
Ref:
http://docs.runmyprocess.com/Developer_Guide/Composite_API/Composite_API_ExampleHope this helps.
Regards,
Murali