Help

Re: Get an expiring url from an attachment cell value

Solved
Jump to Solution
1252 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Yaniv_Amesllem-
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello!

Is there a way to get a public expiring url of an attacement through a script?

I use this code to get the cell value: 

let aTable = base.getTable("Table Name");

let queryResult = await aTable.selectRecordsAsync({fields: [aTable.getField("Attachment field")]});
 
for (let recordInd = 0; recordInd < queryResult.records.length; recordInd++)
{
     let attachmentCellValue = queryResult.records[recordInd].getCellValue('Attachment field)
}

//attachmentCellValue.url is a private url and I would like to get it as a public expiring url


Thanks!

1 Solution

Accepted Solutions
Sho
11 - Venus
11 - Venus

It appears that the automation scripting has not yet implemented the expired URL.

Since we can get the expired URL from the field, how about generating a list of record IDs that you need and process them in the repeating group?
2023-11-22 221423.png

See Solution in Thread

2 Replies 2
Sho
11 - Venus
11 - Venus

It appears that the automation scripting has not yet implemented the expired URL.

Since we can get the expired URL from the field, how about generating a list of record IDs that you need and process them in the repeating group?
2023-11-22 221423.png

Yaniv_Amesllem-
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you @Sho !

That's a great workaround, initially I wanted a json string containing some list of expiring download urls. But I can manage also with a repeating group. 

I truly appreciate your help.