Is there an easy way to look up an array value from an "index"

I have programmed very complex code in Basic (yeah, Basic) for years, but want to learn Thunkable.

I have an array of 10 values, and want to look up a value based on an index variable, then change a RichText backround color based on the chosen value. ChatGPT keeps showing incorrect methods. This would be simple in Basic, but I can’t get it to work in Thunkable.

Any solution? I can’t be the first to need this.

1 Like

You’re right. This is literally all I need to complete my app. :sob:
Someone help this dude quick before I lose my sanity trying to find the answer myself

The project link has expired but you can use the blocks in this post to do what’s essentially a vlookup: Performing a VLOOKUP in LocalDB - #28 by tatiang

I think you can also simplify it by replacing the in list... block with the green index block.

Finally completed my app. Thank you!

1 Like