Beanshell Hash Variable Plugin v5

A Beanshell Hash Variable Plugin provides a way to add an "if-else" condition when using hash variables to display in a form or userview.

This plugin is for Joget Enterprise v5 users only. Joget v6 & DX already have this feature built-in.

For example, if you type this:

        "Welcome #currentUser.username#",

in a Form CustomHTML or Userview, it works fine if  the user is logged in to Joget Workflow.

However, if he is not logged in, it will display as:

        "Welcome ,"

 

Here are the steps to use the Beanshell Hash Variable:

  1. Create a new environment variable, example "welcome".
  2. Paste this script into the "welcome" value field:
    if (username != null && username.length == 1 && !username[0].isEmpty()) {
           return "Welcome " + username[0] + ",";
    } else {
           return "";
    }
  3. Save the environment variable record.
  4. Add this into the userview header field:
    "#beanshell.welcome[username={currentUser.username?url}]?html#"
  5. Save the userview, publish your app and run the userview to view.
  6. If you are logged in, your userview will display the welcome and your username. If you are not logged in, it will not display anything in the userview header.

 

Steps To Import This Plugin

  1. Click "Download" on this plugin screen (It will be a .jar file).
  2. Go to your Joget Workflow localhost or server, in Joget Console navigate to "Admin Bar>Systems Settings>Manage Plugins" and click "Upload Plugins" button.
  3. In "Upload Plugin", select the plugin .jar file you just downloaded, then click "Upload".
  4. Depending on the plugin type, you can now view your new plugin in your form or datalist or userview.
  5. Remember to always uninstall the old plugin before uploading a new version.
  6. The Joget Workflow Knowledge Base has more information on managing and developing plugins.

 

265
$ 0.00
Additional App Information
November 4, 2015
v1
Joget, Inc.
info@joget.org
More Plugin By Joget, Inc.
1 Download PDF Datalist Action Plugin
2 Email With Process Audit Trail PDF Plugin
3 Email With Template Plugin
4 Enhanced Theme Plugin
5 File Link Datalist Formatter Plugin
6 Full Text Search Datalist Plugin
7 Gantt Chart Userview Plugin
8 Hyperlink Options Filter Plugin
9 JDBC Form Load Binder Plugin v5
10 JDBC Form Store Binder Plugin v5
11 JDBC Options Binder Plugin v5
12 Mobile Push Notification Plugin
13 Mood Rating Plugin
14 Not Permission Plugin
15 Section Tab Plugin
16 Slack Notification Plugin
17 Slack Webhook Plugin
18 Subform Repeater Plugin
19 Submission Stats Generator Plugin
View More Plugin By Joget, Inc.
Write a review
Reviews
Print