1
0
-1

Hi,

I need to do post form submission processing and will be using beanshell. The script will run on both an "add" and an "edit". However I need to differentiate between the two as the processing will be different based on whether I am creating a new record or editing an existing one. How can I check whether we are in an "add" mode versus an "edit" mode in beanshell?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Are you using the CRUD for this? if so, there's a URL parameter being sent to the form to distinguish add/edit mode. i.e _mode=add or _mode=edit. You can use request parameter hash variable to get that value.

      Hash Variable - Knowledge Base for DX 7 - Joget | COMMUNITY

      1. CF

        Thank you Ian. I was not using CRUD but your answer pointed me in the right direction. I added a custom parameter and was able to read it from the hash variable.

      CommentAdd your comment...