Howdy,
I have a database that deals with inventory for serialized items. For each item, I need to know when they have been found to be in-stock. Here’s what my setup looks like today:
- Records are items uniquely identified by a serial number
- One link-to field is
Inv_Seen Inwhich collects values each month that that item has been present for. As an example, one record will have been “Seen In: 2022-06” which means it was seen in June 2022. I manually type “2022-06” for each item. - This setup is working fine, but requires a lot of typing the same exact thing over and over again

Here’s my “dream” setup that I’d like help writing a script to achieve:
- Records are uniquely identified by a serial number
- One link-to field is
Inv_Seen Inand collects values… BUT… - …There is ALSO a button field called
Inv_In Stock?whose action is “Run Script”. That script will populateInv_Seen Inwith “2022-06” (or whatever the month currently is. I am a-okay hardcoding the month value in the script.) for just that single record for which I clicked the button.
The block for me writing the script is that I’m not sure how to pass the current record from the button field to the script. The documentation I have found so far queries for a set of records, but I have not found how to simply act on the single record that belongs to the button.
Could someone post documentation or an example to use the “button” field to pass the current record ID to a script to append text to a field for that single record?
Thank you,
–Mitch





