Skip to main content

Button + Script : How to retrieve the content of a cell present in the row of the triggered button ?

  • May 2, 2023
  • 3 replies
  • 187 views

Forum|alt.badge.img+2

Hello to the community !

 

I'm coming to you because I'm stuck on my project.  
I have a table that contains different columns and the last one is a "Button" that triggers a script. 
I would like to get the content of the cell "dossier" in the row of the triggered button. 

Row NumberFIRSTNAMELASTNAMEDOSSIERBUTTON
1JOHNDOE

49

BUTTON
2MARIADOE21BUTTON

For instance here, how can I make sure that the script is using the value 49 if I trigger the button of the row 1 ?
I would like to automate this, I don't want the enduser to pick a record manually. 

Big thanks for you help,

MaĆ«l 

3 replies

TheTimeSavingCo
Forum|alt.badge.img+31

You can use a combination of recordAsync and getCellValue within your script to get the effect you want


Forum|alt.badge.img+2
  • Author
  • New Participant
  • May 2, 2023

Thanks for your reply @TheTimeSavingCo ! 🙂 
If I'm not mistaken, using recordAsync will make the enduser choose among the records that are within my table, right ? 

Is there a way to automatically retrieve the record of the triggered button ? 


TheTimeSavingCo
Forum|alt.badge.img+31

Thanks for your reply @TheTimeSavingCo ! 🙂 
If I'm not mistaken, using recordAsync will make the enduser choose among the records that are within my table, right ? 

Is there a way to automatically retrieve the record of the triggered button ? 


Yeap, you would use recordAsync with the button.  I highly recommend you check out the documentation linked above, and here's the relevant part of the recordAsync section: