You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to generate unique name for filename everytime we click on oj-sample-export button?

Received Response


I am using oj-sample-export component to download csv file. I want to add a timestamp to the downloaded file for maintaining filename uniqueness.

Content (required):

I am using a JS function to generate a timestamp and appending it to the string in filename property of oj-sample-export.

when i click on download button second time it generates the filename with same timestamp.

Version (include the version you are using, if applicable):

Code Snippet (add any code snippets that support your topic, if applicable):

This is the JS code i am using to generate timestamp.

 PageModule.prototype.generateFileName = function () {

 console.log("File Name Generation");

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!