grafana/scenes

MSSQL Chained Variables are not interpolated

Closed this issue · 2 comments

Hello!

I found this issue (#283) but I have the same problem but with MSSSQL. I already updated Grafana to 11.1.0 and Scenes to 5.7.3

This is my setup:

export const getScene = () => {
  const projectNo = new QueryVariable({
    name: 'ProjectNo',
    datasource: mydatasource,
    query: 'SELECT distinct ProjectNo FROM projects'
  });
  
  const WPS = new QueryVariable({
    name: 'WPS',
    datasource: mydatasource,
    query: `SELECT distinct Procedure FROM Procedures WHERE projectno = '$ProjectNo'`
  }); 

  return new EmbeddedScene({
    $variables: new SceneVariableSet({
      variables: [projectNo, WPS],
    }),
    controls: [
      new VariableValueSelectors({}), 
    ],
    body: new SceneFlexLayout({
      children: getMyTextPanel()
    }),
  });
}

I get this error when the scene is loaded:

image

This is also my stack trace:

image

When there is no chained variable everything works.
Working together with: @LarsStegman

Thank you in advance!

I think you need to use latest Grafana or latest Scenes v5.7.4

Yes updated to Grafana 11.1.2 worked, thank you!