I'm having trouble getting images to work. B...

ux
(Nathan Phillipps) #1

I’m having trouble getting images to work.

Basically:

My google sheets has a column “Image”, which has the formula =IMAGE(HYPERLINK(“https://api.scryfall.com/cards/named?exact=” & H5 & “&format=image”)) , with H5 incrementing by 1 for each row. I have a feeling having the variable in the middle is confusing AppSheet, but there’s no way for me to get the correct image without it. Does anyone know of a way to get images to work in this case? In particular, I want the image to display in Table view as the left-most column, but I don’t think it matters.

I think one solution would be to use SUBSTITUTE to replace the [ " & H5 & " ] with something in AppSheet-speak which means “and the contents of the relevant row of the H column”, but I havent the foggiest how I’d do that. That’s just my first thought.

Thanks!

(Steven Coile) #2

So =IMAGE(HYPERLINK(…)) is a Google Sheets formula in your spreadsheet, not an AppSheet formula in your app?

Does the H column have a corresponding column in an AppSheet table?

Is row 5 significant, or does it just refer to the current row?

(Nathan Phillipps) #3

Yes, it’s the formula in my google sheet. H5 does appear in appsheet but I have it hidden from the user, as it’s the value from another column with spaces replaces with +'s since its for a url. Row 5 is just referring to the current row. Thanks for the fast reply! Would it help if I gave you a link to my google sheet?

(Nathan Phillipps) #4

@Nathan_Phillipps sorry, I meant pluses replacing spaces. Had a bit of a moment, lol.

(Steven Coile) #5

Were this an AppSheet formula, I’d think you’d want:

=IMAGE(“https://api.scryfall.com/cards/named?exact=” & [H] & “&format=image”)

replacing H with the name of the corresponding AppSheet table column name.

I also don’t think you need or should have the HYPERLINK() reference in either the Sheets or AppSheet formulas.

(Nathan Phillipps) #6

I’m not too sure where to put that formula (Today’s my first day with AppSheet, honestly), though I did try a bunch of different places which each complained about the IMAGE part at the start. I (possibly) made some progress, however- I can get a warning symbol to appear (where there was nothing) when I remove the IMAGE part from the spreadsheet (so it’s just the URL and the variable in quotation marks.

(Steven Coile) #7

Hmm… Trying to wrestle both Sheets formulas and AppSheet expressions is difficult. I consider myself an advanced AppSheet user and I avoid mixing spreadsheet formulas into my apps. But I know there are other advanced users that do mix them in. Whatever the case, I’m not well qualified to help troubleshoot spreadsheet formulas as they relate to AppSheet (which is why I gave you an AppSheet expression).

(Nathan Phillipps) #8

I ended up getting it working by playing around with virtual columns. Couldn’t have figured it out without you, cheers! :slight_smile: