Hi @Elizabeth - In 7.9.3 I created a Collector formatted view where (primary) appeared as a suffix after a Collector’s name, when they have isPrimary ticked.
I was doing this with the following xml:
<format name="Collector" title="Collector" class="edu.ku.brc.specify.datamodel.Collector" default="true">
<switch single="false" field="isPrimary">
<fields value="true">
<field sep=" ">agent.text3</field>
<field type="boolean" format=" " sep=" (primary)">isPrimary</field>
</fields>
<fields value="false">
<field>agent.text3</field>
</fields>
</switch>
</format>
I can’t see how I would do this with the new visual interface in 7.9.4. We have deployed 7.9.4 in a test instance, and I can apply the xml above via the xml editor, and it works as it does in 7.9.3. But is there a way to achieve the same result using the visual editor?
The only option I think would be to keep the conditional format, but remove the isPrimary field from the ‘true’ option config, and then have a '(primary) ’ separator for text3, which would put the '(primary) ’ in front of the text3 name. Not ideal.
Think the xml would be:
<format name="Collector" title="Collector" class="edu.ku.brc.specify.datamodel.Collector" default="true">
<switch single="false" field="isPrimary">
<fields value="true">
<field sep="(primary) ">agent.text3</field>
</fields>
<fields value="false">
<field>agent.text3</field>
</fields>
</switch>
</format>
I tried to select something from the ‘Custom Field Format’ and it appeared in the xml as ‘uifieldformatter’ rather than ‘format’ like in my original xml. And editing the xml to be uifieldformatter=" " doesn’t do anything.
Is there a way to add to the ‘Custom Field Format’ drop down, so you can make a field appear either as an empty string (and use the separator field for the actual display value) or appear as a particular string you can specify?
Or is it possible to add a suffix to a formatter? Similar to how you can add one to an aggregation.
I can continue to override the visual editor with my specific xml tweaks, but I worry it may get overridden itself if the formatter is tweaked by someone else using the visual editor.
Thanks,
Zoe



