Hey Datagrok team, I think I’ve found an issue with the current Datagrok API (or maybe I am just wrong with my assumption).
I was using your example here where everything was working well: https://dev.datagrok.ai/js/samples/data-frame/modification/calculated-columns
However, when I was trying to open the Calculated Columns editor on one of our loaded Dataframes I always got this error in the console.
dataframe.ts:2126 Uncaught TypeError: grok.functions.eval(...).prepare is not a function at DataFrameDialogHelper.addNewColumn (dataframe.ts:2126) at addCalculatedColumn (index.js:28)
After some debugging it turns out, that it is not possible to open the editor on a dataframe which was loaded with
grok.shell.tables). I was also able to reproduce this in the example above and added the steps to reproduce below.
Can you please take a look into this and let us know if this is a bug or an mistake on our side?
Steps to reproduce:
- Run script from example above
- Open Chrome DevTools
- (Optional) Verify the dataframe was added to the grok context by typing:
grok.shell.tinto the browser console
- Run following command in the browser console:
Expected behaviour: I would expect to get the same function editor opened as previously with the script
Actual behaviour: Error in the console log.