Issue creating tables via POST/datamodels/{datamodelId}/schema/datasets/{datasetId}/tables
Hello, When I create a table via the following endpoint: POST/datamodels/{datamodelId}/schema/datasets/{datasetId}/tables the table indeed is created, however the "preview of the data" and "the data showing into the dashboards" functionalities don't work. The payload I use to create the table with the API is the following: { "id": "columns", "name": "columns", "type": "base", "columns": [ { "id": "table_catalog", "name": "table_catalog", "displayName": null, "semanticIndex": null, "oid": "e467cc0d-e174-4f6f-b323-a1fe6631b75c", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "table_schema", "name": "table_schema", "displayName": null, "semanticIndex": null, "oid": "0b8a12a6-3210-4ca3-9bd1-f7f697830422", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "table_name", "name": "table_name", "displayName": null, "semanticIndex": null, "oid": "42023ae9-da17-42d7-bf30-76263b37dac9", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "column_name", "name": "column_name", "displayName": null, "semanticIndex": null, "oid": "949662ab-d80b-414e-840f-6b7c9d526f9c", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "ordinal_position", "name": "ordinal_position", "displayName": null, "semanticIndex": null, "oid": "5fd023c6-775b-4086-8fc0-18ae30f288f5", "type": 8, "size": 10, "precision": 10, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "column_default", "name": "column_default", "displayName": null, "semanticIndex": null, "oid": "3aec986a-c05e-41c1-a28c-63b3656c7fbc", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "is_nullable", "name": "is_nullable", "displayName": null, "semanticIndex": null, "oid": "91ec1abd-d8c9-4d49-8fcc-c30314755982", "type": 2, "size": 5, "precision": 7, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "data_type", "name": "data_type", "displayName": null, "semanticIndex": null, "oid": "0191ed88-dda3-4609-adf2-71ee92e17d96", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "character_maximum_length", "name": "character_maximum_length", "displayName": null, "semanticIndex": null, "oid": "9294c71d-a7ee-499c-a545-a2dc7d34e25c", "type": 8, "size": 10, "precision": 10, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "character_octet_length", "name": "character_octet_length", "displayName": null, "semanticIndex": null, "oid": "4cba3687-517e-4a05-9921-f1c4e2b6a6b8", "type": 8, "size": 10, "precision": 10, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "numeric_precision", "name": "numeric_precision", "displayName": null, "semanticIndex": null, "oid": "2d26d3c5-535d-4e2c-9321-88b6cdecef39", "type": 8, "size": 10, "precision": 10, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "numeric_precision_radix", "name": "numeric_precision_radix", "displayName": null, "semanticIndex": null, "oid": "2da2c5a0-d38a-4852-9d98-ca0980bf3b3d", "type": 8, "size": 10, "precision": 10, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "numeric_scale", "name": "numeric_scale", "displayName": null, "semanticIndex": null, "oid": "acff38fc-345e-428c-a531-356db48a247b", "type": 8, "size": 10, "precision": 10, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "datetime_precision", "name": "datetime_precision", "displayName": null, "semanticIndex": null, "oid": "7ad52251-e8df-40e1-832a-9df13f6ada96", "type": 8, "size": 10, "precision": 10, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "interval_type", "name": "interval_type", "displayName": null, "semanticIndex": null, "oid": "bc89e589-7691-4af5-88f8-c99bb3d9e38a", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "interval_precision", "name": "interval_precision", "displayName": null, "semanticIndex": null, "oid": "b04b571f-2d92-446e-88e4-0a84b9935be7", "type": 8, "size": 10, "precision": 10, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "character_set_catalog", "name": "character_set_catalog", "displayName": null, "semanticIndex": null, "oid": "3924dda5-a14f-46dd-b249-feecbed1daf6", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "character_set_schema", "name": "character_set_schema", "displayName": null, "semanticIndex": null, "oid": "875bb8dc-d6da-4ac4-be3f-ca3052ce7dbd", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "character_set_name", "name": "character_set_name", "displayName": null, "semanticIndex": null, "oid": "688e9b83-ec66-48ce-84b2-57d677b7f87f", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "collation_catalog", "name": "collation_catalog", "displayName": null, "semanticIndex": null, "oid": "5cc74c8b-860e-4f3b-a667-a655587e27a9", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "collation_schema", "name": "collation_schema", "displayName": null, "semanticIndex": null, "oid": "2e0325bf-184d-4f6a-a5b4-cdcdc6f0243a", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "collation_name", "name": "collation_name", "displayName": null, "semanticIndex": null, "oid": "e3939c19-49a5-423b-8cb9-6d821888694d", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "domain_catalog", "name": "domain_catalog", "displayName": null, "semanticIndex": null, "oid": "143600c8-99ad-411f-a7b6-d134ffdcd54b", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "domain_schema", "name": "domain_schema", "displayName": null, "semanticIndex": null, "oid": "286dafc1-ad52-47db-818d-c041d6b38d30", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "domain_name", "name": "domain_name", "displayName": null, "semanticIndex": null, "oid": "446a29dd-3804-4d35-8f20-92880acc8dbb", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "udt_catalog", "name": "udt_catalog", "displayName": null, "semanticIndex": null, "oid": "0e3c2ddc-9dbd-4b64-98a1-30bf79c57495", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "udt_schema", "name": "udt_schema", "displayName": null, "semanticIndex": null, "oid": "3b7f2b0f-bc5f-46a7-854f-80bd031f206b", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "udt_name", "name": "udt_name", "displayName": null, "semanticIndex": null, "oid": "205a1c01-47af-42dd-90d9-321c72c53552", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "scope_catalog", "name": "scope_catalog", "displayName": null, "semanticIndex": null, "oid": "33afa09f-f250-43a8-9598-eb9ccbe577dc", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "scope_schema", "name": "scope_schema", "displayName": null, "semanticIndex": null, "oid": "4a940c33-9d02-43af-9042-aa93d2ad6844", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "scope_name", "name": "scope_name", "displayName": null, "semanticIndex": null, "oid": "c7c144c1-3cf5-477a-a7ca-440ff37675cf", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "maximum_cardinality", "name": "maximum_cardinality", "displayName": null, "semanticIndex": null, "oid": "bd9371dd-3dcb-49d0-b961-9718ae9db0d0", "type": 8, "size": 10, "precision": 10, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "dtd_identifier", "name": "dtd_identifier", "displayName": null, "semanticIndex": null, "oid": "4547094b-0f7e-46a2-91cb-1aa765a90805", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "is_self_referencing", "name": "is_self_referencing", "displayName": null, "semanticIndex": null, "oid": "b8ab4c63-17f2-4546-9fe8-9f836436a3b2", "type": 2, "size": 5, "precision": 7, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "is_identity", "name": "is_identity", "displayName": null, "semanticIndex": null, "oid": "489369be-87e2-43b1-b469-e6f635314113", "type": 2, "size": 5, "precision": 7, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "identity_generation", "name": "identity_generation", "displayName": null, "semanticIndex": null, "oid": "24548bc2-d200-4803-8acb-64baa708ea6f", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "identity_start", "name": "identity_start", "displayName": null, "semanticIndex": null, "oid": "83590ce0-1749-410c-9230-80cf2eba73b0", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "identity_increment", "name": "identity_increment", "displayName": null, "semanticIndex": null, "oid": "f295919f-d985-4623-8b03-7e0498a25402", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "identity_maximum", "name": "identity_maximum", "displayName": null, "semanticIndex": null, "oid": "38114b6a-7829-4fab-81eb-280225a4890c", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "identity_minimum", "name": "identity_minimum", "displayName": null, "semanticIndex": null, "oid": "00686f13-6a30-4b39-8164-2fdce57e2894", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "identity_cycle", "name": "identity_cycle", "displayName": null, "semanticIndex": null, "oid": "f228c9c4-ff5a-4bf1-851e-662bb2052d23", "type": 2, "size": 5, "precision": 7, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "is_generated", "name": "is_generated", "displayName": null, "semanticIndex": null, "oid": "796880b1-62f2-4570-9973-dd68b1eac4d9", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "generation_expression", "name": "generation_expression", "displayName": null, "semanticIndex": null, "oid": "f30b5f8a-b90e-4bb9-a5f1-9049b416b678", "type": 18, "size": 2147483647, "precision": 2147483647, "scale": 0, "hidden": false, "indexed": false, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null }, { "id": "is_updatable", "name": "is_updatable", "displayName": null, "semanticIndex": null, "oid": "bc151a93-c760-49b7-994c-f4355827a899", "type": 2, "size": 5, "precision": 7, "scale": 0, "hidden": false, "indexed": true, "isUpsertBy": false, "lastUpdated": "1970-01-01T00:00:00.000Z", "description": null, "expression": null, "import": null, "isCustom": null } ], "buildBehavior": { "type": "sync", "accumulativeConfig": null }, "hidden": false } What I get on the preview is: { "moreInfo": { "why": { "name": "InvalidRequestException", "message": "InvalidRequestException", "errorCode": 8, "wrongParameter": null, "trace": null, "why": "BE#406574 \"columns\" Table has no columns or does not exist." } }, "code": 22003, "message": "An error occurred while executing request to connector: BE#406574 \"columns\" Table has no columns or does not exist.", "status": 400, "httpMessage": "Bad Request" } When I create the exact same table, BUT from the UI the functionalities mentioned above work. May you help us with that? Best regards, Rado6Views0likes1CommentHow to create a filter within a widget?
I know there are ways of creating custom filters with BloX, where we can pinpoint to a widget we want to affect but is there any solutions out there to have a filter WITHIN a widget? I provided some images of what I want to achieve.Solved35Views0likes6CommentsCustom Filtering to allow users to filter for specific zip codes
Hi DRay and friends, I am trying to allow my users to filter for multiple different zip codes, and specific zip codes to their use cases. Right now in Sisense a user would have to search and click the ones they want, I know with custom code filtering then can give the codes they want to filter for. Is there any easier way, maybe BloX, where a user can search/filter for multiple zip codes without looking them up/without using the custom code filter option? example: { "explicit": true, "multiSelection": true, "members": [ 33825, 34420, 33834, 33525, 34432, 32134, 33843, 34690, 34691, 33852, 33810, 34638, 34639, 33549, 33559, 33558, 34652, 34470, 34471, 34472, 34473, 34474, 34475, 34476, 34479, 34480, 34481, 34482, 33556, 32179, 34683, 34684, 33576, 33870, 33872, 33875, 33584, 34488, 34491, 33604, 33605, 33610, 33612, 33613, 33614, 33617, 33618, 33619, 33624, 33625, 33637, 33647, 33603, 33607, 33609, 33615, 33626, 33634, 33635, 34689, 33592, 33873, 33543, 33545, 33544, 33540, 33541, 33542, 33823, 33827, 33830, 34714, 33523, 33837, 33896, 33897, 33838, 33839, 33841, 33844, 33847, 33855, 33849, 34759, 33850, 33851, 33853, 33859, 33898, 33801, 33803, 33805, 33809, 33811, 33812, 33813, 33815, 33854, 33860, 33856, 33868, 33867, 33877, 34787, 33880, 33881, 33884 ] }74Views0likes7CommentsSisense Intelligence token estimation
Hi. We are considering activating Sisense intelligence to use a LLM for our data models and dashboards. We want to estimate how much this would our organization from the LLM provider side. It depends on the tokens that are input into the model. In the Sisense documentation it mentions that depends on the number of tables and column of the model, but I guess also on the pre-instructions text that is sent along the user's input. Is there a way of knowing how many tokens are added, or how much would cost to create a medium size dashboard given the OpenAI pricing? Thanks, Javi.29Views0likes2CommentsHide dashboard filter based on filter title
I'm looking for ways to hide certain dashboard filters based on their title name. Is there a way to do the same? Also, the filters will be added as dependent. For e.g. we can have these 4 dependent filters Filter1 >> Filter2 >> Filter_3 >> Filter4 and we need to hide the one with an underscore in its name.2.4KViews0likes9CommentsCount (Boolean)
I have segmented the sample and i have 5 distinct segments. We have recoded the segments with a (boolean) Yes or No. So the data is setup as Segment A = Yes/ no. I want to use the 123 indicator to display the count of the segment and the secondary value as % of total sample. I have tried the 3 formulas below and none of them are giving me the count 1. COUNT( FILTER(SEGMENT_A], [SEGMENT_A] = "Yes") ) 2. COUNTDISTINCT( FILTER([participant_id], [segment_A] = "Yes") ) 3. COUNT( FILTER([Segment_A], [Segment_A] = "Yes") ) / NULLIF( COUNT( FILTER([Segment_A], [Segment_A] IN ("Yes","No")) ), 0 ) Can you please advise what is the right way to calculate the count for Segment A?14Views0likes2CommentsPercentage in formulas
Hello! I'm trying to work out how to get a percentage value in a formaula. The results are not what I'm expecting so i imagine it's my maths letting me down.. The end result needs to be a percentage count of all safeguarding events ever. What my formula is currently looking like is: ([# of unique EventUID], [Was the incident a safeguarding?]) / ([# of unique EventUID]) * 100 With [Was the incident a safeguarding?] being filtered to TRUE. This gives me a result of 266% Base values for objects are: [# of unique EventUID] = 19,761 [Was the incident a safeguarding?] N/A = 18,321 FALSE = 876 TRUE = 564 Any help would be appreciated31Views0likes4CommentsColored labels in table
I'm having an issue with the widget script to color the labels in a table created by harikm007 in a previous post. https://community.sisense.com/t5/build-analytics/colored-labels-in-table-widget/m-p/10780 I have successfully been able to implement the script. However, the color flashes quickly when I load the dashboard then disappears. Any reason why or if I have to change the script?Solved712Views0likes10CommentsColumn chart with full range x-axis
I'd like to create a column chart for which the x-axis always has values from 0 to 52 in increments of 1. The purpose of the chart is to show how many weeks of inventory remains at each distribution center. The x-axis represents the number of weeks of inventory remaining, and the y-axis is the number of distribution centers. I'd like to understand if a solution can be applied within the dashboard widget instead of the Elasticube. Since a Viewer can use the dashboard filters to select different item types instead of all items, generating 0 values in the Elasticube would cause a considerable amount of unnecessary data to be generated. The attachment shows the current chart, which DOES NOT force all values from 0-52, and thus is visually misleading. Regards, Jim62Views0likes6CommentsHow to target a specific cell/column to change the column in a pivot table?
I have a pivot table where I am trying to turn the "Activity date for billable time" light green (can be any color) in my widget edit script, along with its corresponding value from another column, 2025-08-18, in this example. I have tried a couple of different script but nothing seems to work: (function () { // === settings === var VALS = 'Activity date for billable time'; // sub-header text to match var COLOR = '#e6f4ea'; // light green var MAX_TRIES = 40, RETRY_MS = 150; // --- tiny helpers (no backticks) --- function getRoot(w){ return (w && ((w.$$container && w.$$container[0]) || (w.$container && w.$container[0]) || w.container)) || document; } function qAll(root, sel){ return Array.prototype.slice.call(root.querySelectorAll(sel)); } // Find runtime column index by reading row-1 sub-header text function getColByRow1Label(root, vals){ var tds = qAll(root, '.table-grid.table-grid--top td.table-grid__cell--row-1'); for (var i = 0; i < tds.length; i++){ var td = tds[i]; var textEl = td.querySelector('.table-grid__content div'); var txt = (textEl && (textEl.innerText || '').trim()) || ''; if (txt === vals){ var classes = td.className.split(/\s+/); for (var c = 0; c < classes.length; c++){ if (classes[c].indexOf('table-grid__cell--col-') === 0){ return parseInt(classes[c].split('--col-')[1], 10); } } } } return null; } // Inject a CSS rule so it survives re-renders/virtualization function injectCSS(root, col){ // remove any prior rule from this script var old = root.querySelector('style[data-col-color]'); if (old && old.parentNode) old.parentNode.removeChild(old); var css = '' + '.table-grid.table-grid--top td.table-grid__cell--row-1.table-grid__cell--col-' + col + ' .table-grid__content{' + 'background-color:' + COLOR + ' !important;' + 'border-radius:4px !important;' + '}\n' + '.table-grid:not(.table-grid--top) td.table-grid__cell--col-' + col + ' .table-grid__content{' + 'background-color:' + COLOR + ' !important;' + 'border-radius:4px !important;' + '}'; var style = document.createElement('style'); style.type = 'text/css'; style.setAttribute('data-col-color', 'col-' + col); style.appendChild(document.createTextNode(css)); (root || document.body).appendChild(style); } function runOnce(w){ var root = getRoot(w); if (!root || !root.querySelector('.table-grid')) return false; // DOM not ready yet var col = getColByRow1Label(root, VALS); if (col == null) return false; injectCSS(root, col); return true; } function schedule(w){ var tries = 0; (function tick(){ if (runOnce(w)) return; if (++tries < MAX_TRIES) setTimeout(tick, RETRY_MS); })(); } // hook into widget lifecycle widget.on('domready', function(w){ schedule(w); }); widget.on('refreshed', function(w){ schedule(w); }); // try immediately too schedule(widget); })(); : (function () { var COLOR = '#e6f4ea'; // light green // 1) Color the VALUE cells for the target column member widget.transformPivot( { type: ['value'], // only data cells columns: [{ // << CHANGE THIS to the exact dim used in the Columns panel >> dim: '[Program_Assessment_Response_Question.Program_Assessment_Question_Version_Name]', // << keep this as the visible member text in your header >> members: ['Activity date for billable time'] }] }, function (_metadata, cellEl) { // Paint value cells without touching alignment cellEl.style.setProperty('background-color', COLOR, 'important'); cellEl.style.setProperty('box-shadow', 'inset 0 0 0 9999px ' + COLOR, 'important'); cellEl.style.setProperty('border-radius', '4px', 'important'); } ); // 2) (Optional) Also color the COLUMN HEADER cell for that member // If your Sisense version supports targeting column headers: widget.transformPivot( { type: ['columnHeader'], // header cells along the columns axis columns: [{ dim: '[Program_Assessment_Response_Question.Program_Assessment_Question_Version_Name]', // << same dim as above members: ['Activity date for billable time'] }] }, function (_metadata, cellEl) { // Header DOM is the TD; center style already handled elsewhere, so only background var content = cellEl.querySelector('.table-grid__content') || cellEl; content.style.setProperty('background-color', COLOR, 'important'); content.style.setProperty('border-radius', '4px', 'important'); } ); })(); DRay any suggestions or anyone from your team have an idea?Solved25Views1like1Comment