1
0
-1

Hi there,

Is there any sample to overwrite the parent list grid cell value once the value in child form is changed? My scenario as below, reset the completion date to blank in parent form if the completion status in child form had changed to "No".  Would appreciate for any advise.  Many thanks ahead.

 

Child form


Parent form


 

Regards,

Wah Man

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi

      You can try this Javascript to init/blank the completion date value if status === a certain value on submit click (amend the field id names accordingly to yr form, add this script in yr child form customHTML element):

       

      <!-- Add in form customHTML -->
      <script>
      $(document).ready( function() {
          $('#submit').click(function() {
      		var myStatus=FormUtil.getValue("status");
      		if (myStatus === 'completed') {
      			$('[name=completionDate]').val("");
      		}
       });
      });
      </script>
      
      

       

      You might need to remove the field validator (mandatory field) on 'Completion Date' for this to work, else you will not be able to save the form into the form grid with a blank 'Completion Date'. Instead use JS to check if status === ongoing, 'Completion Date' is mandatory.

       

      1. Wong Wah Man

        First of all, thanks for your answer. In fact, my problem is I am not able to reset to blank value in parent form - list grid cell value. Would appreciate for your further advise. Thanks.

      CommentAdd your comment...