<ASK>The Best Method For Refreshing List Using Dynamic Component Card View with Schema

Hello, i make a dynamic Component card view with Schema.
I’m using Google Spreadsheet as database.
when i delete a list using button Click. it worked perfectly in database. my clicked list deleted the row successfully. but not so well in Application side. Although the data was deleted in database side, but card view still load the old list data. the list not refreshing.

my logic said, for refreshing, you need to repeat the Create List - Delete List - Create List Process. But i can’t represent it in block.
can i get a little help with a method for refreshing in my case?
this is image for how i create list with dynamic component schema.
at the right side, is my attempt to get a delete function, but it seems not working, something wrong.

The logic is, you have deleted the item from list but not from this global list so after deleting the item try to delete the same from the global list and use the above procedure then recreate the schema. It will work with the new global variable

so the scema need to recreate also…
but how to do to delete the global list??

i tried this, but not work…

When the web got text just save the values in tinydb… after deleting particular item from the listview, delete the same from this tinydb using the block remove item from the list, and save the new list in tinydb and recreate schema(no need to modify anything in schema) from this tinydb

my apologize, but im not using tinydb in my case. im using google spreadsheet.

i made the sequence from this case :

  • When screen init, just setting the web url.
  • i made web1 component for containing the spreadsheet URL
  • when web got text, they set up variable with data from google sheet and create dynamic card schema with that data
  • when anycardview clicked, it preview the list item in another layout inside same screen, with visible-unvisible changing way…
  • i made Web2 component for containing the google script function for saving data.
  • i made the button for deleting the selected list item, so after delete the list item, the google script function will delete the row in database,
  • after deleting the row in database, i want to refresh the list… I’m stuck here with how to arrange the block for refreshing list…

here my full block if it needed.

Put the schema creation with length of the global datagoohlesheet in a procedure.

When delete card clicked,
Already you designed blocks to del data from gsheet. Here you can call once again the web url from gsheet and repeat the process or

Delete the time from global list using the block index is in list and once again run the schema procedure

1 Like

First correct

Then use a clock component and move web1.url and web get to when clock timer in order to give spreadsheet a little time to make changes

1 Like

thx… so what i do in first is correct…

ohh i don’t think the clock timer will use that way, i will try first… thanks

So what i just need is a Timer… for spreadsheet to load…
here is the conclusion in my case…

i’m using clock with 3 seconds properties

and for the function of deleting all id in dynamic component :

thx. so simple ways , i feel so stupid lol… everything needed is always time… :smile: :smile: :smile:

You can do without clock too… just have to set only only thing that set global get data variable to create empty list in when web got text.

Please read the suggestion

Just setting the web url alone was needed… if you put the web url and scheme creation in procedures blocks could be reduced

You could have move the second time web 1 call in when web2 got text event(which confirms deletion)… simplest way too

1 Like

i did that… look at my block… i set up URL after i delete list… and create schema again… i repeated that…

technically in background process, it reset the list and create list again…
i checked that, with manually refresh, it works… but it just didn’t immediate work…
in the user viewpoint (Smartphone screen) the data seems no change…

i think my problem is just from the front-end… not back-end…
but with the clock, it give my screen time to load, so the data can load well

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