How to clear a radio button field?

71 views
Skip to first unread message

Igor Santos

unread,
Nov 23, 2022, 7:45:39 PM11/23/22
to mementodatabase
This is quite straightforward: when created, a non-required radio button field has no value. However, after you select one of those buttons, it's not possible to clear it up again.

I understand radio buttons sort of work that way by design, but if that was really the case, for consistency, all radio buttons would have a default value and would be required. Since that wouldn't make sense, I guess not being able to clear a radio button is a bug?


Thanks!

Bill Crews

unread,
Nov 23, 2022, 8:07:47 PM11/23/22
to Igor Santos, mementodatabase
In JavaScript, the field should be set to the value null, which I believe will achieve just what you want. Since triggers don't run until after saving, I'm not sure how to indicate to Memento that it be done. You might have to construct a way.

As far as I know, there is no way using the user interface to set the value back to null.

--
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 mementodataba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/8ab0c59f-371c-4d71-932a-932e8fa0d297n%40googlegroups.com.

Craig Hunter

unread,
Nov 24, 2022, 12:24:14 AM11/24/22
to memento...@googlegroups.com, Bill Crews, Igor Santos, mementodatabase
I would say it is a bug in the user interface, and the javascript is a work-around. Radio buttons should be cleared when you tap on the already selected value.
Craig

Bill Crews

unread,
Nov 24, 2022, 2:08:04 AM11/24/22
to Craig Hunter, mementodatabase, Igor Santos
I agree, but what else can I say?

Er Mo

unread,
Nov 24, 2022, 1:24:14 PM11/24/22
to mementodatabase
Hallo
Für solche Fälle , wenn ich einen " Null "Eintrag brauchen,habe ich eine Auswahl im Obtionsfeld mit einer Leeren Beschriftung eingefügt . Ich Glaube das die PC Version immer den Ersten Wert vom Obtionsfeld nimmt wenn keiner ausgewählt wird .

Hi
For such cases, when I need a "Null" entry, I put a selection in the options field with an empty label. I believe that the PC version always takes the first value from the option field if none is selected.

Ernst

Bill Crews

unread,
Nov 24, 2022, 4:15:02 PM11/24/22
to Er Mo, mementodatabase
That's true for SCL fields, Ernst, but for Radio Buttons fields, I don't think so. I could be wrong; I haven't tested it.

Igor Santos

unread,
Nov 27, 2022, 8:03:17 PM11/27/22
to mementodatabase
It's indeed wrong. Radio buttons start empty, as I started in the original post.

Empty entries don't exactly make the cut since they'll create an empty line when that field is selected as "status" of the entry - when it's not selected, the empty line is not produced, which should be the correct behavior.

And then again...... There's no official channel for bug reporting. As mentioned in the beta thread, we can send a private feedback about the beta version to Google Play, but (1) this is not related to beta and (2) not related to Android. Desktop has no such channel, and the mentioned support email is not seen anywhere. I'll try both the email and UserVoice, in hopes this gets viewed by the devs, somehow.

From a dev POV, it's probably an easy fix. The question is: how long is their bugfix queue hahah

Igor Santos

unread,
Nov 27, 2022, 8:07:22 PM11/27/22
to mementodatabase

Bill Crews

unread,
Nov 27, 2022, 9:54:51 PM11/27/22
to Igor Santos, mementodatabase
The issue has been discussed since 2015, if not longer. I don't think it's a matter of fix queue length. I was not aware you could report bugs via Google Play, but that's only one platform. If it's to be by platform, we should have a link for iOS, Windows, & Linux, as well. Situations like the one you're experiencing require a single reporting link across all platforms. I suggest sup...@MementoDatabase.com. Unfortunately, there is no knowledgebase to collect them.


Igor Santos

unread,
Nov 27, 2022, 9:59:49 PM11/27/22
to mementodatabase
Yep, I agree with you in absolutely all points.
I sent an email already to that address, mentioning (1) the bug and (2) the lack of a central place (or the awareness of one) for bug reporting, where people could appropriately follow up, instead of drowning their inbox. If I get any feedback, I'll post back here :)

Bill Crews

unread,
Nov 27, 2022, 11:54:44 PM11/27/22
to Igor Santos, mementodatabase
Thanks, Igor, for all of us.


Igor Santos

unread,
Dec 2, 2022, 10:48:24 AM12/2/22
to Bill Crews, mementodatabase
The sole answer to a 6-line explanation on how bug reporting is hard was: "you can report to me". I guess, via the support email I used, but then again I answered with some suggestions and explaining this way it's harmful for us and for them. 

On the radio button bug, though, the current suggestion is a small JS workaround. Here's his POV:
Really, it is just not implemented the ability to clear the radio button. We'll try to implement this.
But while you can create a script button for clear field:
create a button field with this simple script: entry().set("Radio button name" , null)

Igor Santos

unread,
Dec 2, 2022, 8:36:01 PM12/2/22
to Bill Crews, mementodatabase
Actually, that workaround doesn't seem to work - I guess he suggested something out of his head instead of testing out the suggestion first (been there, done that).

Setting the field to null causes nothing to happen; setting to an empty string creates a new, empty value in the given radio; setting to undefined creates a surprising "undefined" entry lol

Will report back to the developer and update here with any solution.

Igor Santos
Web Developer / Community Leader @ Toptal - top 3% of freelancer talent

Beth Dixon

unread,
Dec 2, 2022, 9:48:51 PM12/2/22
to Igor Santos, Bill Crews, mementodatabase
Try this....I tested by creating a Radio Button field and called it Button and gave it one item called Test.  I then edited the entry and tapped on the Button field.
Then I created a trigger as follows:
Entry view card
Place of action
entry().set("Button" , ' ')

When I tap on the arrow it clears the radio button.

Beth

Bill Crews

unread,
Dec 3, 2022, 12:43:59 AM12/3/22
to Igor Santos, mementodatabase
I have achieved the result by setting it to null in the past just as Vasiliy & I suggested. I don't know why it didn't work for you.

What happened when you tried setting to null? Did some button still appear as set? Did the script fail to execute?

The script would be entry().set("RbField", null);
...within a Button field script.

Bill Crews

unread,
Dec 3, 2022, 12:51:32 AM12/3/22
to Beth Dixon, Igor Santos, mementodatabase
I gather this was actually an action and not a trigger. Also, it could be done using a field of type Button, as suggested by Vasiliy. If an empty string cleared the Radio Buttons field, that's surprising to me and counter to Igor's reported experience, but if you say so, it's apparently true. The value I used to clear it was null.

Beth Dixon

unread,
Dec 3, 2022, 9:46:40 AM12/3/22
to Bill Crews, Igor Santos, mementodatabase
My apologies, yes it is an Action not a trigger.  As I said in my email, I created a button field, created the Action and then tested it.  I would not have said otherwise if it didn't work.  If it's surprising to you give it a try.  Maybe I am not understanding Igor's needs.  I have included screenshots.
- Beth
Screenshot_20221203-094356_Memento Database.jpg
Screenshot_20221203-094410_Memento Database.jpg
Screenshot_20221203-094422_Memento Database.jpg

Beth Dixon

unread,
Dec 3, 2022, 9:52:49 AM12/3/22
to Bill Crews, Igor Santos, mementodatabase
Sorry Igor, forgot to include script.  See attached.

- Beth

On Sat., Dec. 3, 2022, 12:51 a.m. Bill Crews, <bill....@gmail.com> wrote:
Screenshot_20221203-095043_Memento Database.jpg

Er Mo

unread,
Dec 3, 2022, 12:28:22 PM12/3/22
to mementodatabase
Hallo
Ich glaube wir Reden von 2 Verschiedene Dingen , die zwar gleich Aussehen aber unterschitliche Wirkungen haben . 1 Ein Leerer Eintrag , 2 Kein Eintrag . In der Ansicht sicht man das nichts Eingetragen ist . Das Programm aber hat einen Eintrag ( 1 ) der nichts Anzeigt . Oder es hat Keinen Eintrag ( 2 ) . Einen Eintrag eine Leere Anzeige ( 1 ) zu geben ist möglich . Ein Opdionsfeld Keinen Eintrag ( 2 )zu geben , wenn es mal einen Eintrag hatte , ist meines Wissens nach ,nicht möglich

Hi
I think we are talking about 2 different things that look the same but have different effects. 1 An empty entry , 2 No entry . In the view you can see that nothing is entered. But the program has an entry ( 1 ) that does not show anything . Or it has no entry ( 2 ) . It is possible to give an entry a blank display (1). As far as I know, it is not possible to give an option field No entry (2) if it once had an entry

Ernst

Beth Dixon

unread,
Dec 3, 2022, 1:10:56 PM12/3/22
to Er Mo, mementodatabase
Hallo Ernst, ich verstehe, was du meinst, aber es gibt Igor die Möglichkeit, das Schaltflächenfeld zu löschen.  So wie es jetzt aussieht, müssen Sie, sobald ein Schaltflächenfeld ausgewählt ist und Sie entscheiden, dass Sie einen Fehler gemacht haben, den Eintrag löschen und wiederholen.


 Ich bin auch auf dieses Problem gestoßen und überarbeite im Allgemeinen den gesamten Eintrag.  Also stelle ich sicher, dass ich wirklich auf dieses Feld tippen möchte, bevor ich meine Arbeit beende.  :)


 Aber jetzt, da ich diese Arbeit entdeckt habe, werde ich sie in meiner Bibliothek ausprobieren.

Hi Ernst, I understand what you are saying but it gives Igor the option of clearing the button field.  As it stands now, once a button field is selected and one decides they made a mistake you have to delete the entry and redo it.

I have run into this issue as well and generally I redo the whole entry.  So, I make sure I really want to tap on that field before I finish my work.  :)

But, now that I have discovered this work around I am going to give it a go in my library.  

- Beth

Reply all
Reply to author
Forward
0 new messages