Skip to content

Instantly share code, notes, and snippets.

@qnkhuat
Created June 10, 2025 10:49
Show Gist options
  • Save qnkhuat/1b19543b9d80d66afbb3411e91e758be to your computer and use it in GitHub Desktop.
Save qnkhuat/1b19543b9d80d66afbb3411e91e758be to your computer and use it in GitHub Desktop.
  1. Action button on dashboard
  • no record in action
  • saved on dashcard
"visualization_settings": {
    "table_action": {
        "kind": "table.row/update",
        "table_id": 6
    }
}
  • for action that maps to model action:
:action_id: 100
:visualization_settings
   {:actionDisplayType "button",
    :virtual_card {:name nil, :display "action", :visualization_settings {}, :dataset_query {}, :archived false},
    :button.label "Click Me"}
  1. Row action on questions
  • no record in action
  • saved on dashcard
"visualization_settings": {
    "table.enabled_actions": [
    {
        "actionId": -3,
        "actionType": "data-grid/row-action",
        "id": "ab64ba5a-e05d-1ce9-2965-c66ac6ca4326",
        "name": "create",
        "parameterMappings": [
        {
            "parameterId": "EAN",
            "sourceType": "ask-user"
        },
        {
            "parameterId": "TITLE",
            "sourceType": "ask-user"
        },
        {
            "parameterId": "CATEGORY",
            "sourceType": "ask-user"
        },
        {
            "parameterId": "VENDOR",
            "sourceType": "ask-user"
        },
        {
            "parameterId": "PRICE",
            "sourceType": "ask-user"
        },
        {
            "parameterId": "RATING",
            "sourceType": "ask-user"
        },
        {
            "parameterId": "CREATED_AT",
            "sourceType": "ask-user"
        }
        ]
    }
    ]
}
  1. Editable on dashboard
  • no record in action
  • saved on dashcard
"visualization_settings": {
	"editableTable.enabledActions": [
		{
			"actionId": "data-grid.row/create",
			"actionType": "data-grid/built-in",
			"enabled": true,
			"id": "8fa486e6-e4c4-bb8c-a19f-d3f2946ab62a"
		},
		{
			"actionId": "data-grid.row/delete",
			"actionType": "data-grid/built-in",
			"enabled": true,
			"id": "ee27f454-3476-a948-7692-e0fda02a02e0"
		}
	],
	"initial_dataset_query": {
		"database": 1,
		"query": {
			"source-table": 7
		},
		"type": "query"
	},
	"table_id": 7
}

Add row action will add a record to "editableTable.enabledActions"

{
    "actionId": -4294967303,
    "actionType": "data-grid/row-action",
    "id": "d73e7978-1365-c714-9192-af7072fea52c",
    "name": "update",
    "parameterMappings": [
    {
        "parameterId": "ID",
        "sourceType": "row-data",
        "sourceValueTarget": "ID",
        "visibility": "readonly"
    },
    {
        "parameterId": "ACCOUNT_ID",
        "sourceType": "ask-user"
    },
    {
        "parameterId": "EVENT",
        "sourceType": "ask-user"
    },
    {
        "parameterId": "TIMESTAMP",
        "sourceType": "ask-user"
    },
    {
        "parameterId": "PAGE_URL",
        "sourceType": "ask-user"
    },
    {
        "parameterId": "BUTTON_LABEL",
        "sourceType": "ask-user"
    }
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment