Unable to use lodash functions


I am trying to use lodash functions (_.keys and _.values) to filter existing data and use as data source for a dropdown. But I am running to "is not a function" error. I believe retool supports this library and I don't have to add them manually. So, I am not sure if I am missing something?

Screenshot 2023-08-10 at 11.12.51 AM

yes, Retool come with lodash.
it work for me.

Copy this and test.

May there is some problem with your questionTypesForSelection.value,
You can test it with {{questionTypesForSelection.value}} to see if its value is right.

If not work, pls let me know which type retool you use, cloud or self-host, and version?

questionTypesForSelection stores a simple dict object similar to the one you shared. I've even tried it by hardcoding the object previously to make sure there was no issue with the state variable I was trying to reference.

Screenshot 2023-08-10 at 9.47.58 PM

It is a self-hosted retool instance and we are currently on version 2.121.3.

It maybe a bug.

You can use Object.values() as workaround.

you can edit your topic to add a tag of bug

or upgrade to latest version, maybe it fix in that.

Updated the topic, thanks! The strange thing is I have used these lodash functions previously in other apps and these apps are currently in production and actively being used. But, when I edit even those apps, I see the same error. I don't think we updated the retool version recently, but I will have to check with our team and see if we can upgrade the version.


Yeah, I am currently doing that so I can move forward. But, flagged the bug because this is new to me like I said. Thanks!

Hi @sravan

I can't seem to reproduce this on 2.121 :thinking: Let us know if upgrading made a difference!

Thanks, Anson, for the current solution!