System Frontier v1.51.7286.12454

As we wrap up 2019, I’d like to let you know about some exciting new additions to System Frontier for this latest release. We have the absolute best customers and their feedback is constantly helping move the product upward and onward.

New Field Types

We’ve added a few new custom field types to make it even easier to capture user input and automatically validate it and pass it to code behind your custom tool. All of our examples to date are PowerShell, but custom tool code and preprocessor code can be any scripting language that can run on a Windows server, like Python or (if you’re feeling retro) VBScript or Batch.

With all custom fields in SF, they can be dynamically generated on the fly from the objects you are working with – no HTML code is required. The new MultiSelect field lets you search large lists of items and select multiple values. Those values will be passed to your script in CSV format.

The new Table field type automatically generates a DataTable that you can search, sort and select a row from. The selected row value will be passed to your custom tool script. One key thing to remember with this new feature as that property names of the objects you put on the databus will be used for the table headers. If the custom field is any other data type, the property names, or in the case of an array – the first value, will be ignored. Example:


If ChartList is a ListBox custom field, only Donut and Bar will be available in the drop-down. Instead, you’ll need to add an initial value to act as a label:

Custom HTML Now Possible

There are several other built-in custom field types and since they are automatically rendered for you, it takes the pain out of having to manually code a GUI front-end for your script. The ability to insert your own custom HTML in the tool output has always been available, but what if you want to completely customize the way the form looks when it loads for the user in SF? With the new HTML custom field type, now you can!

In the example below, we’ll leverage this feature by setting our custom HTML and JavaScript code in the default value of the custom field, but you can definitely do this and much more in your preprocessor code.

Let’s Do An Example

First, create a custom field called “HTML-Location”. Make sure you select the HTML data type. In the Default Value section, paste the code below…


It should look something like this…

Now, create a small script to output the results of the tool and save it. We’ll use PowerShell…

Create a new custom tool and import the script you just created. Click on the Modify button under User Input Fields, select the new HTML-Location custom field and add it to your custom tool.

In the Arguments section, replace it with the following:

Before saving the tool, under Credential Mapping, set a credential for the tool to run as. Save it. If everything is wired up correctly, you should get two cascading drop-down lists based on the custom HTML and JavaScript you added.

Returning Data

When you run the tool, your script should output the value selected in the Location drop-down. You can get as complex or as simple as you want with the custom HTML you add, but to ensure the result of it gets to your script, you’ll need to have some JavaScript that sets the value of the custom tool field. In the example code, it’s this:

The HTML element id will always start with “user-input-“. Appended to that will be the name of your custom field, all lowercase.

Pretty simple, but very powerful. We can’t wait to see what you do next with System Frontier.

Leave a Reply

avatar
  Subscribe  
Notify of