All Apps and Add-ons

Implement logic when saving parameters using Add On Builder

mas
Path Finder

Hi! Anyone experienced with the new AddOn Builder (3.0.1)?

I would like to implement some logic before saving an "add-on setup parameter" or a "data input parameter". To be more precise, I would like to manipulate string values, concatenating them and encoding them with Base64. I spent some time doing reverse-engineering of Python code, but it looks like parameters are saved according to some generic logic and it is not possible to override it for specific parameters.

Which is the right way to do this? Where should I place my code, so that it survives to future changed made using the Add On Builder?

0 Karma

chli_splunk
Splunk Employee
Splunk Employee

You can customize this function in python code

def validate_input(helper, definition):
    """Implement your own validation logic to validate the input stanza configurations"""
    # This example accesses the modular input variable
    # text = definition.parameters.get('text', None)
    pass
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...