Radio Buttons

Skip to first unread message

Wilfried Herrmann

Jan 14, 2023, 8:46:30 AMJan 14
to mementodatabase
I'm new to Memento database and Javascript and have a question. I have created a field with radio buttons and now I want to query which option was selected.

Bill Crews

Jan 14, 2023, 9:33:39 AMJan 14
to Wilfried Herrmann, mementodatabase
There are several ways to do this, depending on the context that best suits what you're doing. I'll assume you're viewing the entries in the library entries list.

If the RB field was created with the Display option of Entry status, then the field value will be displayed at the right side of each entry in the list. Though it may not stand out as much as Entry status, the field value will be displayed in the central 2-line Description area if the field is defined as Entry description.

Viewing options
Viewing options are displayed via a menu on the right side of the screen if you're using the mobile edition of Memento. If you're using the Desktop Edition, I'm less certain, but I think viewing options may be available in the central pane just above the list as a toolbar of buttons.

In either case, the choices to consider are Sort, Group, and Filter.

To sort the list in a sequence based on the value of your RB field, tap the Sort button and select the field's name in the list of fields. By default, it will list entries from lowest value to highest (ascending), but if you tap the asc button, you can switch it to list them from the highest value to the lowest (descending).

To group the list of entries by the value of your field, tap the Group button and choose your field from the list of fields. Now the list will be primarily listed one line for each value of your field. To see the entries that have this value, tap the drop-down arrow, and the entries (only this with that value) will be displayed. Note that the bar that sits at the bottom of the entire entries list is now shown for each group, so you have a list bar at the bottom of the list and a group bar at the bottom of each group of entries within the list. It includes only the number of entries by default, but using Aggregation, you can have it provide field value totals or subtotals, averages, and so on in the bars.

The most powerful viewing option is to filter the entries in the list. To get started doing that, tap the Filter button and create a filter for each subset of entries you want to list separately from the others -- maybe one for Red, one for White, and one for Blue (plus the default of listing all entries). If you'd like to switch quickly between the sublists, you can add one, all, or only certain of these filters as tabs that will appear at the top of the screen above the list. Then, it's one tap to switch between the entries with each of these values or switch back to the full list by tapping the All tab.

A recently-added feature of each field definition provides an option to display the field's values as tabs of the sort I just described. This is not as flexible as using filters, but it simplifies the job of defining the filters and tabs, so you could look for that when you define your field.

There are other methods, including using a different color for each value of your field or for each entry in which your field has that value. As always, you can use scripting to enhance your experience in Memento, including to do things like setting colors and so on. If you have further interest, we could get into such things if you ask for that.

Happy viewing and have a happy new year. I hope this is helpful to you.

On Sat, Jan 14, 2023, 08:46 Wilfried Herrmann <> wrote:
I'm new to Memento database and Javascript and have a question. I have created a field with radio buttons and now I want to query which option was selected.

You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Reply all
Reply to author
0 new messages