Required field and saveCallback

48 views
Skip to first unread message

svi...@astrainfotech.com

unread,
Dec 4, 2017, 3:56:43 AM12/4/17
to Fujitsu RunMyProcess Developer Community, Vinod Varma, Vipin Kumar, Vipin Kumar, Vinod S
Hi

I have set some fields as required and I have code to save data into collection in save button.

var my_object= {};
my_object.f1=id_field_1.getText();
my_object.f2=id_field_2.getText();
col_TestDB.saveCallback(my_object, add_ok, add_ko);

function add_ok(result) {}

function add_ko(result) {}

When I try to save without required field, it comes with error message that I need to fill in required field but when I provide that data and save, it creates two records in collection .. one corresponding to my earlier entry without required data and one with the data (please find attached screenshot)

Kindly let me know how I can avoid this issue

Request help

Regards

Vinod

rmp_dataduplication.png

svi...@astrainfotech.com

unread,
Dec 4, 2017, 4:03:06 AM12/4/17
to Fujitsu RunMyProcess Developer Community, vinod...@gmail.com, v...@astrainfotech.com, v...@bpas.ae, svi...@astrainfotech.com

Hi

Hi

I am attaching screenshot again as earlier screenshot was showing only part of the data

Request help; thanks in advance

Regards


Vinod

rmp_dataduplication.png

shraddhap...@gmail.com

unread,
Dec 4, 2017, 1:55:43 PM12/4/17
to Fujitsu RunMyProcess Developer Community, vinod...@gmail.com, v...@astrainfotech.com, v...@bpas.ae, svi...@astrainfotech.com, suppor...@runmyprocess.com
Hi Vinod

Please use below function in your script:
RMPApplication.validate();

This function returns true if all mandatory fields are filled and false otherwise.
For reference: https://docs.runmyprocess.com/API_Reference/JS/RMPApplication.html

Do feel free to contact us if you have any further queries.


Regards,
Shraddha Pangantiwar
Fujitsu RunMyProcess Support

svi...@astrainfotech.com

unread,
Dec 6, 2017, 1:02:17 AM12/6/17
to Fujitsu RunMyProcess Developer Community, vinod...@gmail.com, v...@astrainfotech.com, v...@bpas.ae, svi...@astrainfotech.com, shraddhap...@gmail.com

Thank you, I shall try that and revert

Reply all
Reply to author
Forward
0 new messages