I'm experiencing an issue with a transformer within a query in Retool. When I click "Preview" on the transformer, I can see the expected data with dates correctly formatted. However, when I click "Run", no data is returned in the application, despite the preview showing results.
Here are the details:
- Transformer Purpose: Format date fields and replace nulls with a dash ('-').
- Behavior Observed: "Preview" shows data, "Run" returns no results.
- Expected Behavior: "Run" should reflect the same data as seen in "Preview".
Transformer Code Used:
return data.map(row => ({
...row,
next_pre_survey_date: row.next_pre_survey_date ? moment(row.next_pre_survey_date).format('MMM D, YYYY') : '-',
// Additional fields follow the same pattern...
}));
![4E16E1D0-1637-4794-8ED1-A2C9D24BA43D|325x500](upload://xtSKDoOnl5E26LIDRoblIVRzEFC.png)
![E7243EAE-21C5-440A-90A8-3164DA02CEB0|351x500](upload://1GAhDJPvaHwSzAbTBdfmVhjVa3v.png)