Creating a new log, with a modal
Next, we are going to add a “Create new” button to our Service Log. We want to enter the new details into a form, inside a modal.
First, we will create and configure a button.
    Create the button, and position it on the screen using a container. We place the container above our Service Log table, then place the button inside, and right-align it.
    Click on your button, and choose “Define Actions”.
    Add a “Navigate To” action, with the URL “/servicelog/new/row”, and tick the box to “Open screen in modal”.
Next, we will build the screen for “New Service Log”.
    Click on the “+” button to create a new screen.
    For “Template”, choose “ServiceLog - new”.
    Set the URL to “/servicelog/new/row”.
    Uncheck “Create Link in navigation bar”.
    Click “Create”.
    Budibase has generated a form for us, but we should remove some unnecessary columns:
      ID - this is generated by our database
      VehicleID - this is handled by the “Vehicle” dropdown
    Finally, we need to tell our screen to “Close Modal” on save, which is not the default action for this type of screen.
      Click on the “Save” button
      Click on “Define Actions”
      Remove the “Navigate To” action.
      Add a “Close screen modal” action.
Last modified 1mo ago
Export as PDF
Copy link