Can't Find Variable

  • Goal: Eliminate the Can't Find Variable Error

  • Steps: I can't really troubleshoot it because I can't ever find a time that the variable doesn't exist.

The datetime picker is just a date picker on the screen and exists the entire time. This is in retool mobile. When I hover over the {{dateTimePicker1.value}} it even shows the correct value.

Can you expand the errors? Looks like the errors in and in the punchIn out and Au...? queries, but it could be that they are referencing a property or something that isn't set yet. Could try dateTimePicker1?.value and see if that helps.

I guess I don't know how to decipher the error. Sorry! I did try the ? but didn't seem to change anything.

Thanks for posting! Definitely a bit convoluted to track down. Can you share one of those SQL query details? Looks like maybe there is a lot of referencing other queries? Could be some kind of race condition where they are all running at once and looking to each other for data.

I should have done that to begin with. Sorry! It is in a write block:

You will see it in the DateTime field.

Are you on Self Hosted, or is that a custom component or something? I can't find any Component type called "DatePicker". I've tried all the date components in Cloud Retool, and it seems to me you're using what is (at least currently) called a "Date Time" component.

It looks like your component in its state, but with far more props.

I know it's not ideal, but if you have the "Date Time" component:

Maybe try replacing that one with this one and seeing if it works? I just tried it like this and it inserted without issue.