How to use hash variable in Bean shell?

Confluence User - 19 Aug, 2020

Hi everyone,

How can I use hash variable in Bean shell? I wanted to use it as my form load binder.

String x = #requestParam.category#;

String y = #currentUser.firstName#;

I also try to add "" or '  ' but still nothing happen......

beanshell;hash;variable

1


19 Aug, 2020
confluenceUser
confluenceUser

I tested with the following Java code in a "Form > BeanShell Load Binder" to display the string variable in the joget.log file, after populating with the current user hash variable, works with no errors:

import org.joget.commons.util.LogUtil;

String my_username = "#currentUser.username#";

System.out.println("----------" + my_username);
LogUtil.error("----------Username", null, my_username);
RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print