1
0
-1

Hi experts,

I want to change status letter from incomplete to completed when I clicked the completed button.

How can I do that? 


do I need to modify my workflow?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Use JDBC Datalist Action and SQL to update the status column in your database.

      1. Ian

        You'll need a where clause. Check the link Matthew King gave, there are some query examples. 

      2. Nadh

        Did I am doing wrong? Because the query does not works. 

        UPDATE
        app_fd_hr_sd_details_print
        SET
        c_status =='Completed'
        WHERE
        c_reference_no = '#requestParam.reference_no#'


        I want to set everytime user clicked the button completed based on that reference_no, the c_status will be updated to Completed.

      3. Matthew King

        The SET syntax is wrong, should be ( read here for more information):

        UPDATE app_fd_hr_sd_details_print
        SET c_status = 'Completed'
        WHERE c_reference_no = '#requestParam.reference_no#'

        You can also try ".... WHERE c_reference_no = ? ".

      4. Nadh

        I have tried the query but still it does not work. the c_status does not updated from NULL to Completed

      CommentAdd your comment...