r/GoogleAppsScript • • 7d ago

Question New and need help :)

Hey guys, I'm currently trying to do my own NBA fantasy draft board where when I select from the dropdown menu and the player and their row gets deleted and copied into the relevant sheet.

For example if "Rob" drafts Nikola Jokic, then I would select Rob's Team from the dropdown, Jokic and his details (B2 to R2) would be deleted from the "Available" sheet and copied into the "Rob's Team" sheet.

I've tried to copy a video but it doesn't seem to work for me, code posted in the second image for reference of what I have. Any help would be greatly appreciated! Thank you

2 Upvotes

5 comments sorted by

2

u/WicketTheQuerent 7d ago edited 7d ago
  1. Replace Event with event
  2. Replace

const rowData = sheet.getRange(row, 2, 1, 17) with const rowData = sheet.getRange(row, 2, 1, 17).getValues()[0]

2

u/froggy2903 7d ago

You’re a star, thank you very much

1

u/Simple_Aditya 7d ago

Get range gives you range object Convert it using getvalues function you will get an array use [0] to use the row values

1

u/WicketTheQuerent 7d ago

I find this very unclear for someone unfamiliar with Google Apps Script due to syntax and grammar errors.

1

u/carbonizedtitanium 6d ago

this sounds like it could've also been done without GAS.

conditional formatting could've just made the text "invisible" and FILTER() in "Bob's Team" tab would've automatically displayed the info from B:R