Is there a way to change the "screens"or anything inside a DVL from outside the DVL?

Hello:
This is what I changed to DVL

So now I have this:

To get this:

And these are the blocks to create some movement changing “screens”:

mwenu funciona

and the whole blocks:

But they don’t work inside the DVL. So I come back to my question: Is there a way to change anything inside a DVL?

Thanks

All of your row ids are blank so it’s not going to work. It’s like saying “please drive to the house at ______” but not including the information to fill in the blank.

Depending on the data source you’re using, a row id can be an integer (the row #) or a long string of text. You can get that string from the “list of values” block in the Data Sources drawer. Choose ID for the field name.

Hello, thanks for the answer. I was wondering why I could put the green “Row ID” in the “set data_viewer_listMedical’s ingles” of the Data_Viewer_Listmedical", but I got an error when I put it in the “To speakUK2” for example. I will try your contribution. Thanks again

A green block will not work inside of a custom function. If you need to use that value, assign a variable to the green block and then use the variable inside the function. Green blocks only work inside of their immediate containers.

1 Like

@ Tatiang Thans again. I also needed to know that. Well, step by step, it seems to be almost working. I’m still correcting several alarms I’ve got.

@tatiang
As I have a StP UI, How should I establish the height and width measurements of my DVL so that everything comes out complete, although reduced, so that 2 or three screens can appear in a row, they should be relative, …
This is how it appears if I put height with “Fit contents” and width of “fill container”, and the same if I use Fill container in both of them

@tatiang.
I’ve come to another screen. Here the flags and the menu are separated from the DVL, everythig is fine
but in this screen, it doesn’t let me assign a variable to the green block and then use the variable inside the function, I don’t know why.

In the old screen I could, but de dimensions were very bad. And so I can’t get the forward or backwards buttons to work properly. Any idea?

I’m trying this, but it doesn’t work either.

1 Like

Here is the answer to your WHY question. You cannot use the green block outside of the block that contains it.

If you use the item click block of the DVL then you can only use the green block inside this item click. So you need to assign it to a variable inside the block not outside it.

The “list of values” block creates a list. So imagine that you have 3 rows in your data source. The actual values for the ID column (which is a hidden column but we can still use it) might look like this:

R&!8ELWqNxHb
8!5WqQv8kmNu
XH&yxgq2t8?b

So when you use the “list of values” block, you’re creating a list/array like this:

{R&!8ELWqNxHb, 8!5WqQv8kmNu, XH&yxgq2t8?b}

In your screenshot, you’re trying to use that list of values as a row id. That won’t work because it’s not a single value (text string). It’s a list of values. You have to use the list blocks to get a single value from that list. So you might, for example, get item #3 from the list of values which would give you the row id of the 3rd row of your data source:

XH&yxgq2t8?b

1 Like

@tatiang, @muneer:
Thank you both for your teaching. I’ll try to make some blocks accordingly. Not sure, but i’ll try

@muneer @tatiang

So I have assigned a variable inside the block

I’m looking for some examples where I could see your point. I’ll spend some time but,
Where do I have to make the changes, are in buttons or in the DVL somewhre else, everywhere? I’m pretty lost

@tatiang @muneer
something like this?

The green row id block always has a long text string. It will never be an integer. I meant that when you connect a value to the “for row id” section of a block, you can choose to use an integer. But internally, Thunkable will always use a long text string.

So your conditions that check if app variable RowMEDICAL are less than (<) the number of rows in the database don’t make sense. Because it’s like asking is “AR3fl@#$T!QY&6Y” less than 12?

What you really need is the row # (“index”) of the Data Viewer List item that was clicked. It’s a shame that Thunkable doesn’t provide this as a green block as they do for a List Viewer. But you can still get that value using these blocks:

My variable and data source names are different from yours but basically what I’m doing is getting the row id (that long text string) and checking to see where it matches a row id from the list of values in the data source. The result of the “in list find first occurrence of item” block is an integer. For example, if you had the list {“A”,“B”,“C”,“D”} and you found the first occurrence of “C”, that would return 3 because “C” is the third item in that list.

That set of blocks will return an integer representing the row that was clicked (or zero if the row id is not found in the data source but… that shouldn’t happen).

A good way to test this is to use a label to display the result:

@tatiang @muneer
Well, I have changed the beginning of my DVL item click

And we can see that it works (the number 11)

But I can’t get the forward or backwards buttons to work (Button siguiente11 and Button anterior1) And another thing that is happening is that though the app variable shows the 11th number, and it pronounces thae corresponding word, how couldI synchronize the Screens of the DVL with this variable. For example here, the variable points to and speaks the word corresponding to number 11, but the display is on number 1.
Thanks

1 Like

If I understand you correctly, DVL does not have row navigation feature by blocks.

@muneer @tatiang
Hi Muneer.
Of course I didn’t know that the DVL does not have row navigation feature by blocks. So if the navigation is the sidebar, the Menu at the bottom of the app is not needed here. I will remove it. OK. And is it possible to synchronize the Screens of the DVL with this app variable?. Thanks

1 Like

If I were you I would design it in such a way that the DVL shows one single record only. I will then use the arrows in the bottom of the screen to show the relevant row and hide the rest. This way it will give the effect of navigating through the records/rows.

Just a suggestion.

1 Like

@muneer @tatiang
Well, with my StP UI it has been very hard to get the screen to look like it does. Actually, I don’t know how to control what thunkable shows me, because what I see initially is very different from what the machine does afterwards. Getting to what I have now, has taken really a lot of testing. In any case, I’m not sure what you mean when you say “I will then use the arrows in the bottom of the screen to show the relevant row and hide the rest.”

1 Like

I’m not clear on what you want to happen. Do you want one word to show on the screen at a time? Do you want the arrows to switch between individual words or whole lists of words?

1 Like

@muneer @tatiang
In any case, there is some animation on the screen: the British, American and Spanish text and sound are synchronized with their corresponding flags, changing or filling in color at the same time as their phonetic transcription… if you click on the flags, you can listen again to the corresponding pronunciation Not much, but… it is what it is: learning vocabulary.

Hi, Tatiang,

As in the stored variable I have stored the last seen word in the previous session, when I start a new session the first word that Thunkable “reads” and sounds, is the last seen, (in the example the 11th, “abscess”), but you can see that the DVL is showing the first 2 words of the list, (“anguished” and “abdomen”) and a little bit of the third, “abdominal”), and I intend, in this case, “abscess” to be the word that appear first, if possible

1 Like