Tablesearch multiple instances of key
pbrenna630
Member Posts: 2
I have a table with multiple instances of a key. It seems as though the tablesearch function will only return the first instance. Is there any way to return multiple instances of the same key?
Ultimately what I'm trying to do is display text from a cell whenever another cell in that same row shows a particular key. This key shows up in multiple rows in my table and so the final output should show multiple instances of text. I was trying to use the tablesearch function (along with the tablecellvalue function) but the problem is tablesearch only brings up the first instance.
Any ideas?
Comments
Yes. I believe I did a video tutorial on this. Go to the gshelper YouTube channel and look through the latest vids.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
@pbrenna630 , repeat the search until it does not find another occurrence or the end of the table has been reached. Each time, set the start row for the search to the last found row +1.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Hopscotch - that's a good idea. Would you recommend using the loop over table function in conjunction with the search to do that? Or something else?
Braydon - I looked through the videos but couldn't find the one that addresses this topic. Do you know which specific one you were thinking of?
Thanks
You're going to have to do a loop and look for each instance of the key. After finding the key, add it to a variable or table, then search again from that row or column forward. That's the main gist. With family for Christmas so not at a computer to find bids right now.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx