Text Output When Clicking a Button

Like this? New test is a list to receive the data, temp is for get a random item without duplicate, main list is the list from which you get items (the library), a label to show

You had said that you would have to use doc tables to store the texts and I don’t see something like that here.

Yes I suggested to you but you said “I don’t know” . So internal table ? Or you want an example about all kind of database ? This is a simple code , are you sure you will be able to make your app yourself?

if your data is stored in column

edit
The purple block get a column in your database

you will store 8 types, one for column and easy get the right one

I am a beginner trying this platform for the first time.

I need to make the example I mentioned working in the optimum way so I need an expert on this to tell me which is the best way to store the texts by taking into account that there will be hundreds of texts and multiple types that the user picks (the type)on the initial screen.

In the blocks you shared above I dont see any database used and I cannot see which part actually makes the text appear on the screen when the user clicks the button. Can you please explain what each part does?

I was a beginner too and I am a begginer if you think about other people here. You are looking for a tutor, I’m not. I show you many informations, You tried the internal table? You saw some tutorials about them. I’m not expert but I like to help and learn more always, read, try, study… You tried my blocks?

the purple block get columns

the green one , 3 items from a table settings like a column , one under the other like your example. If yu want 2 types duplicate my code

For the optimum you have to make some test, only you know your main project. You can try also a csv format from excel and save it like a list

what is the “repeat 3 times” block for? Why 3 times? Also, what is the “count with i from 2 to” block?

also which part of these blocks is about the consideration of the type the user picked in the initial screen?

Additionally, I used the blocks you showed me but when I click the button it shows all the data from the whole column of the data table instead from one cell each time and it doesn’t consider the option I picked in the initial screen. For this test the user could pick either Spanish or French. You can check the screenshots to see what I tried


Screenshot 2024-02-08 170118

is an example, you can change the number according to your need, the number of content you want to show

show the content picked up in the label

I can’t make all your app, this is only the procedure to get items, after chose you have to save it in a variable to modify the procedure.

Only because your data have 3 rows and repeat block is set for 3 times in my example

yes , you have to save the choice and manage this code. You need a fixed quantity for both choice or not? You want to show them together or separated like you example?

Add more than 3 rows to undestard the final result

@ GoldkingPower Thunker is an example, you can change the number according to your need, the number of content you want to show

I need to show only one content each time. I tried to change it to “1” but it still repeats the same content twice

@ GoldkingPower Thunker I can’t make all your app, this is only the procedure to get items, after chose you have to save it in a variable to modify the procedure.

I certainly have no idea what you mean here and how I could do it

@ GoldkingPower Thunker Only because your data have 3 rows and repeat block is set for 3 times in my example

As I mentioned above I tried to put “1” but now it repeats the same content twice. I don’t want to repeat it, I need to show just 1 content each time (content from 1 cell)

@ GoldkingPower Thunker yes , you have to save the choice and manage this code. You need a fixed quantity for both choice or not? You want to show them together or separated like you example? Add more than 3 rows to undestard the final result

Again I need one content to appear each time according to what type the user chose in the initial screen. If they chose spanish then it should show one of the contents under the “spanish” column, if they chose French then one of the contents under the “French” column". Also, I tried adding more rows but there is no difference, since again it repeats the same content twice (when I change the repeat block to 1). So this whole block is problematic since it seems its function is to repeat

Oh my God, only one . Your examples took me away from the solution. You need only the green lable block + random item from list. To choose the list according to the user click you have to save all the lists inside a variable and after picking the response will give you the right value…when I’m at home a will write a new code

You need only the green one with random list as the first example of Matt

So you need something like this? I added language only for example.
When you start app you have to download all the content in different list variables, one for each type, when the user chooses , save the type inside a variable. This variable will able you to get a random (or not ) element from the right list

This is the block for not random item but you need and index after #

Thank you for your time! Which blocks are for the initial screen where the user picks a language and which for the 2nd screen where text will be generated when the user clicks the button?

It’s pleasure, I like to help

remember this old friend ?

I made all in one screen but you can move the blocks where you want if you understand how they work.

Hi I tried the above blocks but now it doesn’t work. Now when I click the button the app dissapears (I guess this means it crashes). You can check the screenshots for the blocks I used both for the initial screen and the main screen with the button where the text should be generated

It’s probably crashing because you are using an undefined variable. You initialize an app variable called “USER CLICK” as an empty text string (“”). But then you reference an app variable called “app variable USER CLICK” that should be a list.

I never use the app variable " " blocks and I’d recommend staying away from those unless you have a really good reason to. The variables you initialize are listed at the top of the variables drawer so you can find the one for app variable USER CLICK and use that instead.

So you’re using two different variable names and also two different variable types. Remove the empty string block (“”) and consider using an empty list block instead (technically, initialize blocks do not need a connecting block but with lists it’s usually a good idea to use one).

actually I noticed that there was a mistake in the button/click block however eventhough I fixed it again there is a the same issue