I have a similar problem. Reading the hash variable works in the BeanShell form load binder but not in the form store binder. I'm using the same way to access the hash variable in both.
For the form load binder the output of system.out.println is
========================
168_ressourcePlanning_ressourcePlanningMain
========================
For the form store binder the output of system.out.println is
========================
#assignment.processId#
========================
Is there any difference in accessing hash variables from a form load binder and a form store binder?
6 Comments
Hugo
Hi Vishal,
You may use the Assignment hash variable as described in Hash Variables. Hope this helps.
Thanks.
vishal kale
Thanks Hugo,
I want to set the current processid in
the following coding that i have put in the beanshell
FormRow originalRow = rows.get(0);
FormRowSet newRows = new FormRowSet();
FormRow newRow = new FormRow();
String id=#assignment.processId#;
newRow.put("processid", id);
newRows.add(newRow);
return rows;
But it is giving me Error...
Above coding is not working .
Where I am going Wrong please tell me?
or any other method to get process id?
Hugo
Hey Vishal,
I guess you forgot to quote your string?
Cheers~
vishal kale
Thanks Hugo,
I have tried the following ways in my above coding
But still it is not working..
String id=#assignment.processId#;String id="#assignment.processId#";String id=assignment.processId;
Any other ways to get processid in beanshell...
Hugo
You need to quote the hash variable!
"#assignment.processId#"
Hubert Hubbes
Dear Hugo,
I have a similar problem. Reading the hash variable works in the BeanShell form load binder but not in the form store binder. I'm using the same way to access the hash variable in both.
For the form load binder the output of system.out.println is
========================
168_ressourcePlanning_ressourcePlanningMain
========================
For the form store binder the output of system.out.println is
========================
#assignment.processId#
========================
Is there any difference in accessing hash variables from a form load binder and a form store binder?
Kind Regards
Hubert