Hi all, We are using Gooddata Cloud as embedded i...
# gooddata-cloud
g
Hi all, We are using Gooddata Cloud as embedded in our platform using Iframe. We have our own defined filteres in our portal, and with no change from our side (I think), the positiveAttributeFilters stopped working. The dateFilter is working still, but when combined with positiveAttributeFilters it doesnt fire an execute and it doesn't filter the data. It was all working fine few days ago, today we noticed that across all dashboards it is not working. Has anything changed in the request from your side or should I continue to search for the issue at our side?
k
Short answer: nothing in the docs suggests a recent API change, but there are a few common causes to check. What to verify: - Positive attribute filter payload format (iframe postMessage) - Use the label’s identifier in displayForm. - When sending plain values (not URIs), set textFilter: true; otherwise, the command is treated as URIs and won’t match. [[Embed dashboards](https://www.gooddata.com/docs/cloud/embed-visualizations/iframes/embed-dashboard-via-iframe/#commands); [Slack thread fix](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1710166144679969?thread_ts=1710166144.679969&cid=C04S1MSLEAW)] Example payload:
Copy code
{
  "gdc": {
    "product": "dashboard",
    "event": {
      "name": "setFilterContext",
      "data": {
        "filters": [
          {
            "positiveAttributeFilter": {
              "displayForm": {
                "identifier": "your_label_identifier"
              },
              "in": [
                "Your Value"
              ],
              "textFilter": true
            }
          },
          {
            "relativeDateFilter": {
              "dataSet": {
                "identifier": "your_date_dataset"
              },
              "granularity": "GDC.time.date",
              "from": -6,
              "to": 0
            }
          }
        ]
      }
    }
  }
}
- Multiple date filters limitation - If the dashboard has multiple date filters, setFilterContext via postMessage currently cannot change the filter context. Test with only one date filter to confirm. [[Embed dashboards](https://www.gooddata.com/docs/cloud/embed-visualizations/iframes/embed-dashboard-via-iframe/#commands)] - Quick sanity checks - Ensure you’re not passing type: "dataset" in displayForm; just use the label identifier. [[Embed dashboards](https://www.gooddata.com/docs/cloud/embed-visualizations/iframes/embed-dashboard-via-iframe/#commands)] - As a control, try a negativeAttributeFilter with notIn: [] (acts as “ALL”) to verify the command path still works. [[Embed dashboards](https://www.gooddata.com/docs/cloud/embed-visualizations/iframes/embed-dashboard-via-iframe/#commands)] - If values appear in rows but filters fail - It can be a cache/state issue with label elements; try reloading cached data and test again. [[Slack cache note](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1701279846296009?thread_ts=1701279846.296009&cid=C04S1MSLEAW)] If you’ve already set textFilter: true and have only one date filter and it still doesn’t execute, please share a sample payload and a traceId—we can help pinpoint further.
j
Hi Goran, we are currently checking on this behavior for you. Would you be able to send over a code snippet of your embedded enviornment? You can DM me if it is sensitive information.
g
Hi @Joseph Heun we have been working on this issue yesterday and today and we have figured out that a stricter policy for the filters was introduced. We sent the filter data values with lowercase, but the data in the filter was with uppercase. Previously this was working it was firing the event, but I guess in GoodData something changed to insert this stricter policy and not fire the event at all. We updated it on our side to accommodate this change
j
Ok, thank you kindly for the update. I will confer internally on this
g
@Joseph Heun thank you too, have a great weekend