Answered

Store day and time in a variable

  • 17 December 2021
  • 10 replies
  • 463 views

Userlevel 1
Badge

Hello again. Is it possible to store in a variable the day and time a typeform completed?
It is data that I know is obtained, because I can see it in the response report, but I do not know if it is possible to store it.
Thanks!

icon

Best answer by mathio 20 December 2021, 02:50

View original

10 replies

Userlevel 7
Badge +6

@Garral - where do YOU want to store the data? If you connect your typeform to a Google Sheet, the timestamp is submitted along with the rest of the typeform’s data/responses. 

des

Userlevel 1
Badge

Hi John. I'd like to store it in a variable so that I can later use it as the unique identifier for that particular answer, since there's no other way to do it.
Thank you for your answer!

Userlevel 7
Badge +6

@Garral i think you can get at this information using the API/webhook framework… but @mathio or @picsoung might be better able to tell you how do this..

 

BUT since the timestamp is only captured upon submit, in theory, you could use the API to grab the details on submission and then use that to create the unique identifier in terms of redirecting the user to the next form/page (as you seek in your other post) … but those other gents are more versed in that realm than I

Userlevel 1
Badge

Thank you. I'll explore what you tell me, although API / webhook sounds like Chinese to me. Hope there is an easier way to get a unique id for each answer

Userlevel 7
Badge +5

Hello @Garral 

if you want to further process your responses you can find “Start Date” and “Submit Date” when you export and download your data (as CSV or XLSX file).

Or, as @john.desborough mentioned above, you can retrieve your responses via API call and you will find landed_at and submitted_at dates in the returned JSON.

Userlevel 1
Badge

Thanks Mathio, I'll keep that in mind. My goal is to find a way to uniquely identify each Typeform response.
It would be as easy as giving each response a unique code that could then be stored in a Typeform variable.
I am not a developer, but I find it very easy to implement by Typeform developers. And it is a very useful feature.
I hope they decide to do it at some point.

Userlevel 7
Badge +6

@Garral - the best place to store this unique identifier is outside Typeform: if you connect the form to a google sheet you can add a field with your unique identifier (one you define, one you create automatically in the Sheet or using details pulled from Typeform data). Then you can do what you want with the data…. 

you can then autogenerate an email from the Google Sheet with the link to the landing page using the unique identifier to help you create the ‘dynamic url’ in the google sheet. 

there are a couple of posts on that in the community but i don’t have them bookmarked. 

here’s a quick screen shot of the time stamp and ‘token’ that are submitted with the responses.. each token is unique. 

 

des

Userlevel 1
Badge

Thanks John. I know how that works, in fact I have some typeforms using that formula.
But now I need something different. I need to be able to redirect each user to a custom url. For this, it is essential that a unique identifier is generated for each response, which can then be used as a variable on the final screen.

Userlevel 7
Badge +5

I can think of 2 solutions for this. Both include embedding your typeform in a website you own.

  1. You can use a hidden field and populate it with a random value when displaying your embedded form. Then you can use the value in a redirect.
  2. Or you can use onSubmit callback and use the responseId parameter passed to the callback to make your redirect.

Both solutions require development work on your side.

Userlevel 1
Badge

The onsubmit call sounds Chinese to me. As for embedding the Typefor it is not possible for this particular case.
Still, I appreciate your interest. Greetings.

Reply