Firebase Action buttons are simple customisable buttons that can handle 2 types of actions: Filtering a Firebase Repeater, or, when added to a Firebase Repeater template, opening a page by passing the selected line current record and ID.
With the current version, the Action Button Widget does not work with the Collection View mode, that will be implemented in a future release.
The Action Button mode, will let you set up a Filter & order that will be assigned to a Firebase Repeater dynamically.
In order to implement this kind of Filter, drop 2 Firebase Action buttons to your page, and set the “Filters” of each button with different parameters
Then, link the 2 buttons to the Firebase Repeater (option Connect to Virtual List)
You can set 2 filters per button and check/uncheck the “Show only user’s data” checkbox.
You can also setup a sort by field and add a maximum row limit (keep the zero value if you don’t want any limit)
When your filters & Orders configuration is defined, you may have an error message from Firebase during execution if an index is required.
This message will contain a link, if you click on it, it will then load the Firebase Console with the correct parameters for creating the required index.
When you run the project, it is now possible to reload the Firebase Repeater with different parameters:
With Firebase, if you want to filter text field that begin or ending with a letter, you must use the >= operator, for example name>=A and name<B for records that begin with A
The “Repeater Line Action Button” is supposed to be added inside a Firebase Repeater line designed with a custom template and linked to a page. This button will be shown on every line of the Repeater, and if the user click on it, it will load a page by passing the Memory Record and record Identifier.
Action Button within a Repeater Template
When you double click on the button, you can adjust its parameters:
Action Button Settings
Page. Select here the page you want to open when the user click on the line button
Effect. Select the Effect you want to apply when loading the page.
The “Delete Record Action Button” is supposed to be added inside a Firebase Repeater line designed with a custom template and linked to a page. This button will be shown on every line of the Repeater, and if the user click on it, it will delete the record (with a confirmation message)