- My goal: I would like to display specific data in the list view when I click the Delete/Update button.
- Issue: In the table, there is an option to select either the current row or the currently selected row. Unfortunately, the list view doesn't have this functionality. I have to use local storage, but it is causing a problem sometimes. The system stores the old value in local storage, which can lead to the deletion and update of incorrect data.
- Steps I've taken to troubleshoot: -
- Additional info: (Cloud or Self-hosted, Screenshots)-
Hey @Seda_Baskan
I understand your issue you don't find the data according to current row in list view for that you can use the step by step solution :
- First get the data into the list view
Add button in it and on button value you can use the {{ item.id }} for just showing for just the understand the demo.
In list view enable the instance values
On the click of the button you can store the id into the variable and use that variable id into the query that can you get the current row data manually
If you need help tell me.
It a little bit confused me. Maybe share screenhot, it could help you what i wanna success.
When I click the delete button, I want to bring the data on the listview into a modal frame. I use localstorage.values.bankDetails
Text fields:
Are you sure you want to delete {{ localStorage.values.bankDetailsforDelete.bankname }} bank account?
Please see the details below.
- Resource ID: {{ localStorage.values.bankDetailsforDelete.bankId }}
- IBAN: {{ localStorage.values.bankDetailsforDelete.ibannumber }}
- Swift code: {{ localStorage.values.bankDetailsforDelete.swiftcode }}
Is there any other way? Sorry, it was not clear enough to use your solution
Hey @Seda_Baskan
To perform update or delete operations, you just need to store a single id
in a variable when the corresponding button (update/delete) is clicked.
You can set the id
in a temporary state variable within Retool. Once stored, you can use this variable to reference the specific item you'd like to get, update, or delete.
- I save the
id
into a variable when the button is clicked - Then I trigger the appropriate query that uses this
id
And use that id from the variable of the retool :
And using that variable id you can get, update or delete data using the queries.
For example i use the get query :
Like i am using this like on the button i am saving the id into the variable and also trigger the query.