Is there anyway of using “rowid” as a value for numbers/text within Google Sheet?
When submitting a new row, I’d like to know which row number is being submitted so I can add formulas which include references to the row.
I have tried using “number of rows in” which works until you manually clear/delete lines in the Google Sheet. Row ID clearly knows there are blank rows as that adds new rows to “row 2” after I’ve cleared everything. But number of rows still keep incrementing from a previous count.
If I could just get a numerical value back from rowid however this would solve everything!
Can you say more about this? Why do you need the row number of a newly-created row?
I assume you are wanting to find that row again later after adding more rows to the sheet. So you would just search one column (using the find first occurrence
and list of values
blocks is a good way to do that) for a key value and then know which row it’s in.
If I upload an image to a row, then I get the URL of the image. But in the sheet I want to display the image, so need to use the formula =IMAGE(Hx) for example, where H is the column I want to display the image, and x is the current row being inserted.
So if I could use rowid, I could simply add a text string and this would work.
Otherwise, I can’t see a way of achieving this.
Okay, but you can still use a Get Value block to get a specific column and row from a Google Sheet. Why do you you need to know which row number you added? If you know you need to get Image(Hx), then just get that value using the column name and the row number as the row id.
I’m still not understanding the context for why you need this. Can you give an actual example? What kind of app are you making and why is each image tied to a specific column,row pair?
It’s a very simple app - which I just want to use to take a photo, add some comments and upload in a Google Sheet for viewing later.
But - since I can’t upload in inline image to Google Sheets, I have to upload to Cloudinary and then store the URL in the Google Sheet. This is all working perfectly.
However, in order to see the image inside the google sheet, rather than the url, I can use a Google Sheet formula =IMAGE(URL) so it displays the image in another cell.
So, I need to include the formula in as a column when adding a row - so I’m just setting this column to a text block, concatenating text “=IMAGE(H” + rowid + “)”
This means in my column G, I’m creating a formula on the fly, to call the H column value which is where my image URL is stored.
EG - my 1st line is the headers, on the first row insert, the “row” would be 2. Clearly Thunkable knows this is 2 as it inserts if correctly in the next empty row - so I need this value so my formula can be “=IMAGE(H2)”
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.