Hi Team,
I am using smartsheet api and few for loops to get data out of smartsheet. I have few queries with smartsheet api which i need help with. Below is the scenario which i have in smartsheet.
Consider having 20 rows in a smartsheet. Search a specific unique "string" called (ABC123) in Column A of a sheet, if that string is found(say 7th Row), then go to that row where the string(ABC123) is present and get the value of another column(say Column D) in that 7th row with value (HELLO)
To perform this i am currently doing like below.
- To find if string exists in sheet : I am using smartsheetapi -> /search/sheets/sheetid/?query=string.
Here it just displays output as below.
{
"results": [
{
"text": "ABC123",
"objectType": "row",
"objectId": 3594751570798468,
"parentObjectType": "sheet",
"parentObjectId": 7845968654690180,
"parentObjectName": "CAT-NEW",
"contextData": [
"SGDM"
]
}
],
"totalCount": 1
}
2. Then second step i am using for loop to navigate the row, once this string is found in specific row, then navigate with 1 more for loop to search the column D in that row and get the value from that column.
Currently this is working but have few concerns.
Queries:
1. I need row id and column id of the result string when i use search api. Is there a way in smartsheet to get rowid and columnid from search api ? as i don't see this in the output.
2. Is there a way to navigate with smartsheet api to get a value of a string using row/column id ? or any other criteria. This is to avoid the for loop. Because if i consider 10 strings to search in the sheet and get values for each of these 10 strings, then i have to run these 2 for loop for every single string search.
Appreciate any help or guidance on this.
Thank you