I'm trying to make it so that when a user first creates a particular item, it ads it to an app state variable. If that item already exists (either based on passed in string parameters or based on an item index such a specific time stamp) of that item, it will instead update that specific item instead of creating one. How can I accomplish this? The only option is 'Update Item at Index' but I can't seem to make it so that it's actually able to pull the necessary data to update it. I can't use a function such as creating an index of (number of items in list + 1) each time one is created since users can also delete any of the items created when desired. Is there not a way to instead of update an item at index which requires an integer, to instead just reference or search for the data in the list and update it based on this?
Update Specific Item at Index (App Statte)
Actions & Logic
Resolved
Looked at YouTube, Documentation, etc and nothing seems to show how to reference a specific item at index without just having a basic index to pull from and know what you need. I've added an integer type of timestamp to the app state list to be referenced for updating, but this isn't working. When I try to reference the timestamp using unique list item with the customItemIndex (timestamp) I just get an error of "current variable is not valid." How can I fix this?
Yes
3 replies