Skip to content

Ignore non property structures to allow more advanced string building #30

@mzeinstra

Description

@mzeinstra

I would like to create a structure with name (P9) and birth (P19) and death dates (P21):

P9 (P19 - P21)
But if there is no P19 I want
P9 ( - P21)
and if there is no P21 I want
P9 (P19 - )

Currently I cannot configure this. It would be helpful to allow for 'non property paramaters' in the config.

                "*": {
                    "P9": "$",
                    "P9.P11": " $",
                    "P9.P12": ", $",
                    "P19": " ($",
                    "P21": " - $)"
                }

Ideally I would want to do something like:

                "*": {
                    "P9": "$",
                    "P9.P11": " $",
                    "P9.P12": ", $",
                    "_1": " (",
                    "P19": "$",
                    "_2": " - ",
                    "P21": "$",
                    "_3": ")"
                }

I tried using other Properties, but it appears that when no $ is found, not string is placed. I.e. this hack does not work:

                "*": {
                    "P9": "$",
                    "P9.P11": " $",
                    "P9.P12": ", $",
                    "P23": " (",
                    "P19": "$",
                    "P36": " - ",
                    "P21": "$",
                    "P71": ")"
                }

Where P23, P36, and P71 are required fields in the item, so we expect them to be there. But without a $ the line is ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions