Announcement

Collapse
No announcement yet.

Default dynamic logic of a custom field type

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Default dynamic logic of a custom field type

    Hi, I am now working on a custom field type. Can i set the default dynamic logic of a custom field type? thanks.

  • #2
    Go to your entity's clientDefs metadata file and add the dynamic logic directives there.

    Dynamic Logic doesn't care what type of field you have, it just applies defined logic to make a field visible, not visible, read only, etc. You can use the following code as an example.

    In this case the field "tenantName" will be read only if the field "status" is either "Completed" or "Canceled"

    Code:
        "dynamicLogic": {
            "fields": {
                "tenantName": {
                    "readOnly": {
                        "conditionGroup": [
                            {
                                "type": "or",
                                "value": [
                                    {
                                        "type": "equals",
                                        "attribute": "status",
                                        "value": "Completed"
                                    },
                                    {
                                        "type": "equals",
                                        "attribute": "status",
                                        "value": "Canceled"
                                    }
                                ]
                            }
                        ]
                    }
                }
            }
        }

    Comment

    Working...
    X