The search below works only in reports, not in dashboards
sourcetype=ped_venda_e_remessa_via_arq Tipo_Linha=WS |fields Num_Remessa |dedup Num_Remessa | mvcombine delim="," Num_Remessa |nomv Num_Remessa |eval searchquery="SELECT VBELN, COUNT(VBELN) AS CONTAGEM FROM SAPSR3.LIPS WHERE VBELN IN (".Num_Remessa.") GROUP BY VBELN ORDER BY VBELN" | map search="|dbxquery connection="SAP_PRD_DR" query=$searchquery$ shortnames=true" | join VBELN [search sourcetype=ped_venda_e_remessa_via_arq Tipo_Linha=WS | fields Num_Remessa | stats count by Num_Remessa | rename Num_Remessa AS VBELN]
My interpretation of the error:
The statement query=$searchquery$ works well in reports, because is correctly interpreted as a string variable.
The same statement in dashboards does not work, probably because is interpreted as an "input token"., so the dashboard gets frozen, awaiting for an data input before showing the results.
If I adapt my query to the proposed solution by Splunk (putting an input token by time), and inserting it in the dashboard as a "Search Report" my problem will persist in the dashboard:
The statement query=$searchquery$ will continue "awaiting for a data input" that does not exist
If I adapt my query to the proposed solution by Splunk (putting an input token by time), and inserting it in the dashboard as a "Report", The statement query=$searchquery$ will works well, but the statement with the "input token by time" will not be interpreted well, because the dashboard code will just calls the query name (not the statement in full), and the "input token by time" will not receive a proper value.
We need at least one of the two below
- A way to “Search Report” specific query works well in the dashboard; OR
- A way to “Report” specific query allows filtering by date/time in the dashboard