Deleting A Row And Lists From App In Google Spreadsheet Through Extension By AppHelper

Hi Friends I Have One Problem Im Created Delete Option In My App Its Working Perfeclty But One Time Only Because After Deleting A Row From Google Spreadsheet Its Changing Position And Its Row Number Up And Down Any Solution Plz Help Me…

blocks(11)

Plz Understand My Problem

If you are selecting (for eg second cardview) , then which row it deletes from gsheet?

Also you must remove item from global order row number… else your app will give wrong index number.

Every time you not only should remove item from gsheet also must remove this global variable too

1 Like

Second Row Only For First Time

I Dont Understand Plz Give Me A Details

Then this is the reason . You are removing item from gsheet first time but afterwards if you select cardview it will gives you wrong index number

Im Created Seperate Row Coloumn For Identify Rows

Have you get my point?

Imagine you are having 5 items.

Now you are selecting second item and removing values from gsheet, also removing dynamic Id But not removing item from global list(after deleting item from gsheet and if you r calling values ince again and storing into the variable mean , no issue)

Now again i am selecting again 2nd item mean now your index will be 2 but index in the list won’t give you correct index number

May be i am wrong to understand your blocks. But i feel this is your issue. Else i will check from my side later

1 Like

Im Very Confused S i r Plz Help Me

The simplest way is, instead of stroing the component in this variable, just store the number only…

Use the option get dynamic Id block and by using replace block just get only ID and imagine that is the index number of the item to be deleted and design

And no need to initialise the global variable here with create empty list, just initialise with number zero or empty text box

1 Like

I Got It Thanks For Replying

This Is Right Way For Getting Rows And Deleting Rows Now Its Worked For Me

Can You Confirm These Blocks It Work Or Not.

I am not sure but you can use notifier alert or any one label to catch the value . Then add the remove row number block

But Im Just Test It Works Perfectly S i r
Just Confirm Me Plz These Blocks Are Not Giving Errors In AnyLists Deleting

Then just go on man… why do you have to worry or awaiting to see any error report . Just compile it and enjoy with more apps

If it throws any error you can ask here . Also make sure really the if then else block is needed when yes button is clicked? Because when any card view long clicked you are filtering the ID so that part alone i feel not needed

Mostly we use this method to get the index number of the item clicked to be delete or to carry forward the nth of the list to next screen…

Upon long clicking the cardview and after passing the rule contains text use your global variable to store only the index (using the above block replace) And you can use this number directly into delete row number and no need of that replace blocks in yes_btn click.

Simple

(PS- after deleting row i hope you must recreate the dynamic componets excluding the deleted item. To do this only i have advised you to delete the item from the lists which used to create the dyna component. To remove the list item you can use the same index number obtained in the above steps.)

Thanks For Helping Loves From Heart :smiling_face_with_three_hearts::smiling_face_with_three_hearts::smiling_face_with_three_hearts::smiling_face_with_three_hearts:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.