Alternative foreign field for link field?

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • hi-ko
    replied
    Hi tanya,
    thanks for your suggestion. This is what we are already using but ends up in a separate field. Sometimes the users don't want to see the name at all but need the functionality from the link field therfore something like
    Code:
    "fields" : {
        "caseTest" : {
            "type" : "link",
            "field" : "number"
        }
    },
    "links" : {
        "caseTest" : {
            "type" : "belongsTo",
            "foreign" : "tasksTest",
            "entity" : "Case"
        }
    }
    would be great. I created ticket 262

    Thanks
    hi-ko
    Last edited by hi-ko; 10-07-2016, 08:50 AM.

    Leave a comment:


  • tanya
    replied
    You can add a new field with type "foreign",

    For example Case Number field for Task entity

    "fields": {
    "caseTest": {
    "type": "link"
    },
    "caseNumber": {
    "type": "foreign",
    "link": "caseTest",
    "field": "number",
    "readOnly": true,
    "view": "views/fields/foreign-int"
    }
    },
    "links": {
    "caseTest": {
    "type": "belongsTo",
    "foreign": "tasksTest",
    "entity": "Case"
    }
    }

    Leave a comment:


  • hi-ko
    started a topic Alternative foreign field for link field?

    Alternative foreign field for link field?

    When defining a link (belongsTo or hasMany) the name field will be displayed. Is there a way to change the foreign field to show (e.g. the number field)?
    In many cases the name field is not unique.
Working...