1
0
-1

Please help,

How to generate ID not based a counter number but it based group data list,

example:

  • Name : BC, CC, DB, etc
  • type   : UVW, XYZ, ABC, etc
  • Category : A, X, Y, etc

If name BC, type XYZ, category Y; Auto generate ID: BC-XYZ-Y

If name DC, type XYZ, category A; Auto generate ID: DC-XYZ-A 


Thank U at before

Best Regards;

Krisno

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      You can use Form update tool and update the request id field to #variable.name#-#variable.type#-#variable.categort# and if you need to add an auto increment id -->#variable.name#-#variable.type#-#variable.categort#-#variable.autoId#

      AutoId is generated by Id generator field

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi

        I think maybe you could try experimenting with Hash Variable > BeanShellHashVariable and use Java codes to perform the IF-ELSE coding and return the desired string for the ID Generator.... else you can always write your own custom plugin (see Developing Plugins ) and extend the source code (see https://github.com/jogetworkflow/jw-community/blob/6.0-SNAPSHOT/wflow-core/src/main/java/org/joget/apps/form/lib/IdGeneratorField.java ).

          CommentAdd your comment...