Is there a way to get random text value from API request?

Hello,

The title is strange but currently I’m using Alpha Vantage attempting to get stock symbols from their API. I was finally able to get a particular symbol to produce on screen after watching a lot of Appgyver Youtube videos (This was huge for me).

So now I’m trying to create a formula using my data variable to pick a random stock symbol.

I think I’m going about this all wrong though. From a programming standpoint doing this, should I be using an object? or can it be done with the data variable crated and the implementation of a random function?

Also a lot of the random function example I’ve seen deal mostly with numbers and I seem to run into the warnings of text type not being assignable.

Any assistance would be appreciated

Regards,
Eric

Hi! The error you are getting is Text type is not assignable to list type. You are using PICK_ITEM and COUNT which only work for list type variables and you have texts that you are trying to use.

Not sure I understand exactly what you want to do – but I think using SUBSTRING instead of PICK_ITEM or using SPLIT with PICK_ITEM might be what you’re looking for, please check those formulas out and read their documentation carefully! :slight_smile:

Hello Mevi!

Thank you for the info! Sorry for the delayed response. At the moment I’m just attempting to access a random stock symbol from the Alpha Vantage rest API. This is just a hobby project that I’m doing for fun in order to learn more, but I think I got somewhere with the advice you provided. So far, I don’t have any errors using the SUBSTRING function. I’ll test it out later because I have to get to work now, but it looks like this current setup below might work. Thanks again for your help!

image