1
0
-1

Hi,

I have problem to execute hash variable with dynamic parameter

if hashvariable direct value is no problem

String level = "#pl.employee.employeecode.88888.level#"; 

output

I need to dynamic employeeCode into hashvariable 

String emplCode = User.getEmployeeCode();
String level = "#pl.employee.employeecode."+emplCode+".level#";

but i have a problem

output


thanks in advance

best regard

Khafidz

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi, you can try using a nested hash variable Hash Variable#NestedHashVariable

      1. Muhammad Khafidz

        thank you Anders, but still not work

      2. Anders

        According to the examples in the documentation, I do not think you can use the + symbol.

      3. Walter

        The hash variable is only parsed one time. You cannot have it parsed the second time.

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

      I am afraid you cannot split a hash string into two or more parts, Joget hash variables is like a search and replace string function in a text editor. It will find the matching #somehashstring# and replace with the new value.

      Try this instead ( in pseudocode ):

      • Assign #pl.employee.employeecode.88888.level# to string var0
      • split value in var0 into var1 and var2
      • perform your string concat var1 + empcode + var2



      1. Muhammad Khafidz

        thank you Mattew, i have split hash variable like pseudocode 

        but it still not work.

        i try hashvariable to reproccess

        it work,


      CommentAdd your comment...