I am building a database-like list and implementing a feature to display arbitrary data by specifying records with variables.
I attempted to set a value to a variable in the first action within the same state, and then retrieve and display a record from the database using that variable in the next action. However, the result shows the content of the record at the position before the variable was changed.
Below is the result when setting the variable to 3 and retrieving the data:
When I separated the state for setting the variable from the state for retrieving data from the database, the behavior matched my expectations. Therefore, I suspect that even if the variable’s value is changed within the same state, the variable specified in the database operation still holds the value before the change.
I have attached the project used for testing.
databasetest.zip (14.2 KB)




