Lets say this is a list i have created using dynamic cardview, dynamic label and dynamic button so when i cick the button it deletes a dynamic cardview, dynamic label and dynamic button now after deleting it should get back to the exact location where it was deleted from or the last position…
as always, please share block so that we can help you easily.
store id to any variable and then call delete cardview
procedure
and in don’t use for each item loop
just in procedure
first delete all labels and the delete button and the delete card.(you can say in reverse order of creating that layout).
and the we have to change id’s on successive dynamic component.(build logic for that its easy) …
how can i change ids?
it will be better to delete all the cards and the recreate them excluding that is deleted
Do you mean scroll to last position?
Also your blocks will not work because max record can be 1200.
thats whats i am doing… but i want to scroll to last position?
but why will it not work and why the maximum record can be 1200 only?
suppose there are 20 cards and you want to delete 11th card . just follow below logic.
get id of button and store it to variable.(suppose its 11)
then set label and other component data of 11th card from 12th element of list
do above thing from 11 to (20-1) means you have to create loop.
and in the end you can delete last card
because its limit of airtable…
Logic build 2…
create a three variable deletedcard
and initialize it to 0.And another deletingid
initialize it to 0.and lastdeleted
will be declared to 0.
now when any dynamic delete button clicks
then
- store
id
todeletingid
- then check
if last deleted = 0
then set it todeletingid
- and call
delete row
in which row number will beif deletingid<lastdeleted
then set to0
else set todeletingid - deletedid
. - And
set visibility of dynamic card
to false in which id will bedeletingid
- and when row is deleted then set
lastdeleted
todeletingid
and setdeletedid to deletedid + 1
benefit is you don’t need any procedure…
hope you understand this and if this helps you mark it as solution…
i will try and let you know
can you show an example?
no i don’t have any example right now just try the above logic it will work.
thank you man