user
@rprojas
Set and Get Google Sheet row data based on conditional?
Hello!

I ha ve a game developed in articulate where several teams will be playing and I'm using this widget to track wheter or not certain team completed mission 1, 2 and 3.

The game has 3 instances of a "leaderboard" that only track which teams completed mission 1, then, who completed mission 2, and so on. But it only has to retrieve the data of the teams that are playing in that particular session (because the game will be obviously played a lot times over the time the game is posted in our client's lms).

Also, problem 2 is:
I have to retrieve the names of the teams that completed mission 1, for example, meaning I have to get data from a row based on a column "teamCompletedMission1" to be "true".

My question is: is there a way to retrieve data based on a condition of a colum of that row to have certain value?
reply
Reply
user
@support
Hi. Yes, it's just going to be a two-step process:

Step 1 - use SheetsSet to write a formula to filter the data you need using a condition. For example, create a new field TempData and do SheetsSet('TempData', '=[your formula]');

Step 2 - use SheetsGet to read the calculated value of the cell after the formula was applied.
SheetsGet('TempData', 'newdata');
So the variable newdata will contain the filtered data from your spreadsheet.

reply
Reply