Renaming base tables and changing icon

7.11.1

Is there a way to change the name of a table in the schema so that it appears by that name in all dialog menus/form views/the query builder?
Furthermore, can you change the default icon of a table for things like buttons?

When I change the name of the table FieldNotebookPage in Schema Config to "Ledger Page", the name visibly changes only in certain places in the DB and only under certain conditions. The mouseover text for the button linking to the table form displays the database name, not the localized name. Adding a record changes the title of the table/dialog window to the localized name "Ledger Page" before record is saved. After record is saved, the form returns to the database default name, ignoring the localized name. The table name in the Query Builder and most all dialog window lists of tables remains the default Schema name.



Background:
When we were importing our collection’s data into Sp7 initially, we imported scans of our original catalog ledgers as CollectionObjectAttachments. I’ve decided that I want to move these attachment records to the Field Notebook Page and Field Notebook Page Attachment tables, as these tables have the correct relationship between COs that share entries on a ledger page (this avoids this error and also keeps images of the specimens themselves separate from ledger images in dwc exports, which is desirable).

It is very important to me that these records not display in the database as “Field Notebooks”, because they are not field notes, and I want to avoid any possibility that anyone could mistake them as being field notes. I know localizing table names can get confusing, but in this instance, it is essential for storing separate kinds of attachments related to our COs, specimen images that require a many-to-one relationship images–>CO, and Ledger Page Attachments that require a one-to-many relationship from CO to Ledger Page

Hi @nfshoobs,

The icon for a subview button can be set in the XML explicitly. If you type text into the icon= attribute, it will automatically generate an icon for you, see:

<cell type="subview" id="fnp" name="fieldnotebookpage" viewname="FieldNotebookPage" initialize="btn=true;icon=LP"/>

If you want to use an image, you can specify a URL instead:

<cell type="subview" id="22" name="fieldnotebookpage" viewname="FieldNotebookPage" initialize="btn=true;icon=https://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Ledger.png/1600px-Ledger.png"/>

[!warning] Note
This custom icon will not appear in the query builder or in the direct data entry form for Field Notebook Page. There is no way at this time to set a custom global icon for a table.

The mismatch happening in the table name is happening because in Schema Config you have updated the field caption for the fieldnotebookpage in the Collection Object table:

But you need to still update the table caption for the fieldnotebookpage table itself:

Once you’ve done this, it will appear as you hope in both the tooltip and the query results:


Ahhh thanks! I know about the form xml trick, but was wondering about the icon in menus/querybuilder. Good to know that part isn’t changeable at this point.

So for future reference, in order to change a base table name, you need to change the table’s caption in the table itself, and also in the “relationship” fields that reference that table in other tables. Makes sense!

1 Like

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