a mi me sigue sin funcioanr y a vos?
picture is your application codes.
where is create row block?
you demo application does’nt work change values of datasource on listwiver_1
i fix this problem. can you send picture create row block?
Same issue. Create and Delete row
Still haven’t heard anything back from Thunkable support- VERY disappointing. I noticed when inspecting as a web app that there is a console error when the Create Row block is called. I’m guessing this is causing the code to crash and not execute any further. If this is the case, there is nothing we can do - we are at their mercy to fix this. My suggestion is that we all post on their social media so they know how important this is - Twitter, Insta, Facebook. I have already done so…
@mmendelow, these comments are from today on the bug post I linked to above:
Thanks @tatiang this is encouraging
Ios 14.01, Iphone 11, Test App:
Delete And Create function not working well.
It had working 3-4 days ago.
I think Thunkable team are working Develop for Data Viewer.
Please working without this system So all of our app affecting.
My block is similar:
I used left swipe for create (different data view) And delete same time for same id. (Used loading icon, loading icon seeing always i mean crashing :))
Thanks.
This looks to be fixed this morning!
this isnt working for me
maybe the rollout hasnt hit me yet?
and delete rows blocks the next action here
the Debug label never changes
any ideas here guys?
[UPDATE]
So i am seeing strange behavior.
i created this project
https://x.thunkable.com/copy/c0ef52553ad4dea0bbe04992ef1b7744
which works fine in live previw but not on my iPhone. is this an issue with the companion app? when i use preview in chrome on my macbook, the app works as it should. it makes and displays the rows almost instantly. when I run on my phone and press the bbutton, nothing happens.
can anyone else verify this behvavior?
@tatiang, i tested your app and see the same thing. mind checking mine?
anyone else with an iphone mind testing this out?
The demo I posted above (https://x.thunkable.com/copy/551a9c7dd159b9bd74a4629c8d9faf73) should show “C” when you click the button. It didn’t a moment ago but… I did a hard reset of the browser tab (shift-click on the reload button in Chrome) and… tada! “C” appears!
Will try again shortly!!
Although, it’s still not working perfectly. If I add a Wait block inside of a Create Row or Delete All Rows block, it doesn’t run the Wait block. My understanding of the “do” section of those blocks is that it should run after any CRUD-related code and shouldn’t be affected by the timing of anything else.
I modified my demo to add wait blocks. Instead of seeing “B”… “C”, I just see “C”. If I remove the “C” block, I see “B”.
Let me expand on @jaredgibbs example. I opened it on his iPhone in the companion app. Then looked at the blocks. See this image. It would appear there is some communication issues perhaps?
The blocks aren’t showing correct labels. When I click the down arrows there is nothing to choose from.
Strange behavior here
I’m not sure I’m following your example here. I agree that the do section of the block should run after the creation is complete however, there is no guarantee as to when this will be. In fact, I think in almost all cases it should run in the order of set text to A
=> create row
=> set text items to list of values, set text to C
=> create row do section
.
So, I’m not sure what we learn by adding the wait to the end of the do section? It is important to remember that if you’re dealing with local data the delay introduced by creating the row will be minimal so it is possible that the operation is completed so quickly that you only see the label as C for 1 (or potentially even 0) frames that are rendered. I expect that if you were using an external data source (Google sheets or Airtable) you would see the C for a half second or so while the data is being created and waiting for the response from the API.
I ran some quick tests to see if everything was working as I expected and it seems to be. Here are the examples I used (not at the same time but all in the same picture for easier viewing). Give these a try and see if they work for you. If not, let me know and we can dig deeper into this. Also, if I’m misunderstanding your question I apologize. Please take another stab at explaining it to me
Sorry, @Steven, it’s hard to explain this with just text. I might make a short video to explain it.
But for now, I’ll just add that what I expected to happen is that I would see “A” very briefly (probably not noticeable), then “B”, then a delay of two seconds, and then “C.” But there is no delay when I preview those blocks. It’s as if it skips the wait block entirely. I press Preview/Live Test and I just see “C”. So looking at your screenshot, it sounds like you did observe a delay with your wait blocks. I did not.
I don’t have a long-term need to add Wait blocks inside of Create Row blocks but I find it very useful when debugging and/or needing to slow things down to see what’s happening (e.g. changing a label’s text to a variable value and then waiting a couple seconds).
My larger question, which I probably didn’t highlight very well above, is: how do I ensure that a block runs after (and only after) a new row is created in the local data source? I assumed that the “do” area of the create row block is the place for that. But when does the block immediately below the create row block get evaluated? Does that happen as soon as the “create row” block is evaluated or does it only happen after the “do” section is completed? Again, I probably should just make a video!
Ah I see! No, this is a great question that has a fairly complicated answer. Basically the simplest way to think about it is that if a block has a then do
section, the block will begin to process whatever even it is for (create a row in this case) and will then continue on to the blocks beneath it while the code waits for a response on the initial function (again create row in this case), once that work is completed, the do
section of the blocks will then run.
So, if you want something to have after the create row
(or any block with a then do
section) is finished, you should put it in the then do
section. Blocks beneath it (in your example, the set label text to C) will run after we started the work on the create row
block but before it has completed. So, your wait block in the then do
section is actually working it just waiting with no other blocks following it. If you add something like changing the screen background color after the wait block you will observe it waiting and then changing the color.
Does that make sense? This is maybe something we should have clarifications for in the docs somewhere because it definitely isn’t simple.
Awesome. Very clear! Thank you!
This repeat until method by @drted is then quite useful to halt the continuation of block evals: Wrapping Asynchronous blocks into a Synchronous Function - For The WIN.
I’ll have to go back to my project because it definitely wasn’t waiting and it definitely never displayed “B”. If I’m understanding you correctly, the expected behavior would be “A” then “C” immediately then “B” after two seconds. So I should be able to observe “C”…[two seconds]…“B”. What I’m seeing is just “C” (because “A” and “B” go by so quickly, I assume).
For the purposes of understanding how the flow works, it might be best not to use the get list of values
block. As I believe that is also technically working asynchronously and might cause the order to be more confusing since we are waiting for the result of that value under the hood. But yeah, play around and let me know if you have any questions or run into unexpected behavior so I can either help explain it to you or investigate a bug if you find one.
@Steven Thanks. I actually am not using the “list of values” block in my larger project. I just needed to create something with a list viewer to make a quick demo and that’s what I chose. But good to know. I’ll do some testing and post an update if I find anything significant.