# Custom values (Betty)

**URL:** <https://gramps.discourse.group/t/custom-values-betty/7293>\
**Category:** Help\
**Tags:** websolutions\
**Created:** [March 21, 2025, 3:14pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293 "2025-03-21T15:14:29Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartfeenstra](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@bartfeenstra](https://gramps.discourse.group/u/bartfeenstra)\
**Post date:** [March 21, 2025, 3:14pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/1 "2025-03-21T15:14:29Z")

</div>

[Betty](https://betty.readthedocs.io/) currently allows users to map some types of values as they appear in Gramps to Betty plugins. For each of the following, could you confirm whether they (are supposed to) allow custom values or whether they are restricted?

- gender (the UI made it look like it did, but the Python API seems to only allow four predefined values)
- event types
- place types
- roles

Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [March 21, 2025, 3:24pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/2 "2025-03-21T15:24:19Z")

</div>

Gender is fixed at 4 valid values, no custom types.

The other 3 allow custom types.

You can validate with the [Types Cleanup Tool](https://gramps-project.org/wiki/index.php/Addon:Types_Cleanup_Tool) addon that list custom types and allows their renaming/removal.

The tool only lists those items that support custom types. (This might be incorrect. Needs testing. It might also allow resetting type values from-standard-to-standard.)

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [March 21, 2025, 3:34pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/3 "2025-03-21T15:34:28Z")

</div>

I believe that the reason ‘gender’ does not support custom types is due to the features that compose conversational text and adapt pronouns based on gender.

There are features that let cultural bias be applied to the pronoun decision. So adding a new gender requires a lot of tweaking for all the supported languages/cultures.

---

<div class="post-metadata">

**Author:** ![bartfeenstra](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@bartfeenstra](https://gramps.discourse.group/u/bartfeenstra)\
**Post date:** [March 21, 2025, 3:46pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/4 "2025-03-21T15:46:50Z")

</div>

Hi Brian, thanks for confirming my most recent findings!

The way I did it in Betty was just make gender a plugin, provide a few defaults (male, female, non-binary, unknown) and let the community decide which others they want. I may want to distinguish between sex and gender in the future purely because official documents may not reflect someone’s gender (at the time), but other than that there are no further implications, mostly because I aim to keep all translatable strings gender-neutral (regardless of the number of genders, that also avoids clunky and unpleasant things like “he/she” and “his or hers”).

Anyway, this was just to confirm what Gramps does **right now**. I erroneously assumed genders were unrestricted like the others, and had added mapping support for that to Betty, but it seems I can now greatly simplify that.

Thanks again!

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [March 21, 2025, 3:56pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/5 "2025-03-21T15:56:48Z")

</div>

> [@bartfeenstra](#):
>
> Anyway, this was just to confirm what Gramps does **right now**. I erroneously assumed genders were unrestricted like the others, and had added mapping support for that to Betty, but it seems I can now greatly simplify that.

You could use a custom Attribute for the Person object as a Gender “modifier” instead of a custom type for Gender.

The value for an Attribute is typically a single data point. But it could be an array, XML or JSON too.

---

<div class="post-metadata">

**Author:** ![bartfeenstra](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@bartfeenstra](https://gramps.discourse.group/u/bartfeenstra)\
**Post date:** [March 21, 2025, 4:09pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/6 "2025-03-21T16:09:36Z")

</div>

Betty already does ([The Gramps extension - Betty documentation](https://betty.readthedocs.io/stable/usage/extension/gramps/#gender)). There’s **also** a legacy gender mapping configuration that users can set, but I can remove that now.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [March 21, 2025, 4:22pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/7 "2025-03-21T16:22:49Z")

</div>

Interesting! Those Betty link attributes should probably be integrated into the UID concept in [WebSearch](https://gramps-project.org/wiki/index.php/Addon:WebSearch) addon by @Urchello too. Likewise, whatever external ID schema that is used by Gramps Web (and Gramps Web Sync) by @DavidMStraub

Which means you and David should probably examine the WebSearch addon for irreconcilable conflicts before it is released via the [Addon Manager](https://gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Navigation#Using_the_Addon_Manager). It will likely quickly achieve Critical Mass (too many users with too many Attribute records to change. So influencing change becomes difficult) as an external ID standard for Gramps. So you won’t want a conflict there.

---

<div class="post-metadata">

**Author:** ![bartfeenstra](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@bartfeenstra](https://gramps.discourse.group/u/bartfeenstra)\
**Post date:** [March 21, 2025, 4:36pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/8 "2025-03-21T16:36:34Z")

</div>

So the thing about these attributes is that, yes, they’re Gramps attributes, but they’re meant to **map data to Betty’s own data model** , which means that these specific attributes will not be useful outside a Betty/Gramps ecosystem. That said feel free to be inspired. I mostly use them to address ‘missing’ functionality in Gramps’ data model, where Betty allows for more detailed information (such as privacy, which in Gramps is binary and in Betty is ternary).

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [March 21, 2025, 5:09pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/9 "2025-03-21T17:09:52Z")

</div>

> [@bartfeenstra](#):
>
> they’re meant to **map data to Betty’s own data model** ,

I almost grok that… but not quite. (Which is why I hope external application developer will have a private discussion about internal IDs. Inserting myself will just expose my ignorance.) By my guesswork about web GUIs layered on the Gramps engine … or leveraging its import/export engine… is that Persons, Families, Places, Sources will have URL patterns to invoke the Editor/Viewer for that data. And that pattern will probably need awareness of your internal identifiers to substitute into the URL.

Moreover, the Internal ID should be stored in the database in a way that the more mature Gramps Gtk-based gui can reference and edit. (So Syncing to Gramps Web and reuploading data to Betty can become more seamless.) The GrampsWeb addon could test/validate that the Internal ID could be called from the Gramps Gtk gui to the independently hosted Betty or Gramps Web site.

> [@bartfeenstra](#):
>
> such as privacy, which in Gramps is binary and in Betty is ternary

Yes, this was one of the places where the Gramps importer was ‘dinged’ in John Cardinal’s GEDCOM Assessment report. It had more flavors of “Private” than Gramps supported. They looked interesting.

---

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 21, 2025, 6:16pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/10 "2025-03-21T18:16:41Z")

</div>

> [@emyoulation](#):
>
> Interesting! Those Betty link attributes should probably be integrated into the UID concept in [WebSearch](https://gramps-project.org/wiki/index.php/Addon:WebSearch) addon by @Urchello too. Likewise, whatever external ID schema that is used by Gramps Web (and Gramps Web Sync) by @DavidMStraub

I’ve also been thinking about how our web-based reports— **Narrated Website** @SNoiraud, **Dynamic Web Report** , **Gramps Web** @DavidMStraub, and possibly **Betty** @bartfeenstra (I haven’t installed it yet)—could be integrated with the **WebSearch** gramplet in a useful way.  
The idea is that websites could allow access to person pages and other resources using Gramps handles. These handles can be stored as attributes for each person in the Gramps database. For example, I use a Supertool script that creates an attribute called `_GRAMPS_ID` with values like `f7be4fcb5d74bca545e25f5d57a` for every individual.  
If a website supports opening person pages via these handles, we could then configure **WebSearch** to generate direct links to the relevant person (and not only person) pages. This would create a seamless bridge between local Gramps data and external web-based resources.

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/3/3e26569977fcd0158dae8f91de2aba0e2a733bd8.png)

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [March 21, 2025, 6:26pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/11 "2025-03-21T18:26:17Z")

</div>

It _ **may** _ need to include a Tree ID/handle too in order for versioned data to be uniquely identified. Possibly also a Last Changed timestamp for the object.

If multiple users are collaborating through Gramps Web via Gramps for Desktops (Gtk gui) and Gramps Web Sync, then they probably have harmonized object handles. But their Tree handle and timestamps will probably differ.

---

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 21, 2025, 6:38pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/12 "2025-03-21T18:38:14Z")

</div>

> [@emyoulation](#):
>
> It _ **may** _ need to include a Tree ID/handle too in order for versioned data to be uniquely identified. Possibly also a Last Changed timestamp for the object.

so, maybe its time to have any unique and fixed Gramps identifier and import-export it everywhere like FS, MH?

---

<div class="post-metadata">

**Author:** ![bartfeenstra](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@bartfeenstra](https://gramps.discourse.group/u/bartfeenstra)\
**Post date:** [March 21, 2025, 10:54pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/13 "2025-03-21T22:54:07Z")

</div>

While I’m fascinated by where the conversation has gone, I’m a little lost 😁 Do we want UUIDs/GUIDs in Gramps’? Aren’t the handles those already?

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [March 21, 2025, 11:27pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/14 "2025-03-21T23:27:59Z")

</div>

> [@bartfeenstra](#):
>
> Do we want UUIDs/GUIDs in Gramps’? Aren’t the handles those already?

Only for external IDs as a way of facillitating collaboration.

There’s no way that the trees of cousins will align fully. Each cousin will have one parent line and (probably) a spouse line that will be of little interest to the other cousin.

So the current [Gramps Web Sync](https://gramps-project.org/wiki/index.php/Addon:Gramps_Web_Sync) is probably going to have to evolve to sync more selectively in the future. (There’s also no way that 16 collaborators will want to sync into what essentially becomes a “World Tree” on each local machine.)

And a Tree annotation is probably what’s needed to simplify segmentation.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [April 20, 2025, 11:28pm UTC](https://gramps.discourse.group/t/custom-values-betty/7293/15 "2025-04-20T23:28:46Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
