Help

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

Topic Labels: Automations
1561 3
cancel
Showing results for 
Search instead for 
Did you mean: 
maelrx
4 - Data Explorer
4 - Data Explorer

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 3

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

maelrx
4 - Data Explorer
4 - Data Explorer

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:

Screenshot 2023-05-02 at 9.52.24 PM.png