When exporting an Excel file from the Button Group in Workshop,
I am looking for a way to append the timestamp of when the export button is ‘pressed’ to the file name. Even if I set the file name in combination with Function as shown below,
the timestamp of the last time the Workshop screen was reloaded (F5) is appended, causing a discrepancy with the time when the button was pressed.
It seems that this Function is only executed when the Workshop screen is opened or reloaded.
Is there a way to avoid this and use the timestamp of the exact moment the button is pressed in the output file name?
- Function
export class GetCurrentTimestampInJST {
@Function()
public getCurrentTimestampInJST(): string {
let date = new Date();
// convert to JST (UTC+9)
date.setHours(date.getHours() + 9);
return date.toISOString();
}
- Workshop variable setting for appending to the output file name (string)