booleans in custom metadata

88 views
Skip to first unread message

fooba...@gmail.com

unread,
Jun 16, 2021, 9:09:01 PM6/16/21
to Dataverse Users Community
I've been tailoring custom metadataBlocks for my organization. Reading this, I was wondering why there's no boolean fieldType. We have a lot of true / false metadata that I would like to capture -- is there a standard way to do this? Should I use the strings "TRUE" and "FALSE"? 

Thanks,
Aaron Curtis

Paul Boon

unread,
Jun 17, 2021, 1:59:04 AM6/17/21
to dataverse...@googlegroups.com

Hi Aaron,

 

The first thing that comes to my mind is using a dropdown with only Yes or No in it.

So allowControlledVocabulary=TRUE and allowmultiples

=FALSE. Then have the controlledVocabulary, with the values Yes and No.

 

Maybe others have a better solution, somehow resulting in a radio (toggle) UI component.

 

Kind Regards,

Paul Boon

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/0542df81-b31e-438b-8232-9ade0bfa32aen%40googlegroups.com.

Philipp at UiT

unread,
Jun 18, 2021, 9:50:03 AM6/18/21
to Dataverse Users Community
I'm also implementing a metadata schema where several fields use boolean values, and I also think there should be a boolean field type. So far, I have implemented this as a controlled vocabulary; see Paul's suggestion. The attached image shows what this looks like in my Google spreadsheet (I haven't tested any of this yet).

Best,
Philipp

Boolean_field_type.png

gwenaël doux

unread,
Jun 21, 2021, 3:42:44 AM6/21/21
to Dataverse Users Community
Hi all,

From a UX point of view, the dropdown solution seems to be the most adapted solution to replace a boolean field type.
As Paul said earlier, you can filter the answer from the user and limit the answer to one choice.

Best Regards,

Gwenaël Doux

fooba...@gmail.com

unread,
Jun 21, 2021, 6:37:24 PM6/21/21
to Dataverse Users Community
Thanks, these workarounds are OK, but not quite ideal. I created issue https://github.com/IQSS/dataverse/issues/7961 .

Philip Durbin

unread,
Apr 11, 2024, 8:55:32 AM4/11/24
to dataverse...@googlegroups.com
There is a new draft pull request by Jérôme Roucou that adds a boolean field type: https://github.com/IQSS/dataverse/pull/10480


How should it look and work? Please feel free to join in the discussion!

Thanks,

Phil



--
Reply all
Reply to author
Forward
0 new messages