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

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!

0 7 413
  • UX
7 REPLIES 7

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?

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 sorry, I meant pluses replacing spaces. Had a bit of a moment, lol.

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.

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.

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).

I ended up getting it working by playing around with virtual columns. Couldnโ€™t have figured it out without you, cheers!

Top Labels in this Space