Logo

    Home

    Documentation

    Use Cases

    Training

    Applications

    Release Notes

    Button

    Button

    • Description
    • How to use it
    • Settings/Attributes

    Description

    The Buttons are created in Build.One using the SwatButton object. A SwatButton can be used in FormsForms to trigger functions. To do this, the button is included in the form designer and connected to the corresponding function.

    How to use it

    1. Open the form in which you want to insert the button in the Form Designer.
    2. Look for the SimpleSwatButton in the Library of Objects
    3. Drag and drop it onto your form.
    4. Set the Enabled attribute to true (This step makes the button clickable).
    5. Rename the button in the Label attribute.
    6. Create a function that you want to connect with your button.
    7. icon
      Here you find an example for a simple frontend code How-To: Hello World! in TypeScriptHow-To: Hello World! in TypeScript
    8. Save and compile your frontend code with CRTL + S
    9. Perform a hard reset of your browser and empty the cache.
    10. icon
      This is necessary because there are currently two different compiled versions. After you have created and compiled the new frontend code, the code will be available in Gitpod. However, the browser window still has a version with old cached code. By refreshing, you will pull the latest code into your browser window and then be able to use your function.
    11. Got to the attributes of your button and fill in the the function you declared
    12. Select the corresponding event e.g. eventClick and declare it in the following way
    13. #.functionName(eventSource);
      image

    Settings/Attributes

    attribute
    description
    Example/Values
    ENABLED
    enables the button to be clickable
    true/false
    Label
    Name of the button
    String
    eventClick
    Function that will be triggered by the button when clicking the button
    #.functionName(eventSource);

    Back to DocumentationDocumentation

    Back to Home Page

    Logo