Initial state of a variable configured to {} but initiates as ""

I'm having an issue where a variable set to "empty object" initial state initiates as an empty string.

@Roy_Berkowitz What happens when you right click the variable and click reset state. Can you check the state again after that?

"reset states" turns the variable to an empty object as expected.

If you create new variable now and set it to an empty object, does it behave the same and set it to a string?

a new variable withn empty object as initial state works as expected.

Could it be that this "Change row selection" action I have set for a table sets this variable it a faulty way?

This still doesn't make sense cause as seen in the image above, the "row change" action should still set an empty object rather than an empty string.

The table is Grouped, and when the app loads, no specific row is selected therefore this action may be setting to empty string.

I can't debug it though cause as seen in the image below, the value of current row does show an empty object


It is quite strange, Ive tried to replicate, but row selection sets an empty object to the variable via handler. Kind of hard to debug for sure. Does the same behaviour persists with the new variable? Can it be that the variable was controlled by something else and it set its value to string?

It is possible that an event handler is running and setting the value to an empty string at some point. If we suspect this comes from the query running when the app loads, we could add a success event handler to the query that populates the table, where we set the value of the variable to an empty object. However, running the query again would set it back to an empty object.

How is losing the default value affecting the app? Are we keying into the object and getting an error when it's a string instead of undefined? If you share a screenshot of the issue we should be able to find a workaround. :slight_smile: