When the screen is opened among the data from 1 to 100, / it is hoped that ‘one data (1 to 100) will be automatically selected and output randomly’. I’m trying with a spreadsheet, but it doesn’t work. Help me.
I’m referring to this, but there’s no
" in Local_DB1 call GetCell ~~"
you can obtain a list of all values of a specific column in your local database.
then use the random_item_of_list block to get a random object from that list
if your data is static then you can use local-db. however, i believe changes you make to it are not retained so that next time you run your app you start with the intially defined database. if your data is more dynamic then you need to consider using spreadsheet or airbase or firebase, etc. but be prepared to spend some time on the learning curve.
if you read carefully, this block is taking ONE random item from a LIST (which has two slots - the first is a LIST of the answer thjnkable blah blah, the 2nd slot is unused) so the LIST really has only one item. now you’re taking one random item from a list containing one item so you will always get that item - but that item happens to contains a handful of values! that’s why you’re getting the results you describe.
detach the list block with 2 slots from the set text command and reattach the ‘list of values …’ and you should be ok.
why don’t you create a local db of 5+ items, create a screen with a button and label then
go to the data sources gallery and see if there’s a block that returns the list of values of any column
go to list gallery to see if there’s a block that gets a random element of a list
then put those two blocks together to build your label’s text and put them inside a when-button-click block.
I’m sorry, but if you’re a human, not ai,can you show me with a block image? Thank you so much for your help, but I don’t know English at all, and I don’t understand you at all because I’m a beginner.
THIS IS WHY YOU GET ALL OF THEM:
if you read carefully, this block is taking ONE random item from a LIST (which has two slots - the first is a LIST of the answer thjnkable blah blah, the 2nd slot is unused) so the LIST really has only one item. now you’re taking one random item from a list containing one item so you will always get that item - but that item happens to contains a handful of values! that’s why you’re getting the results you describe.
detach the list block with 2 slots from the set text command and reattach the ‘list of values …’ and you should be ok.