Is it possible to pipe text entry answers into a following question based on the date entered? | XM Community
Solved

Is it possible to pipe text entry answers into a following question based on the date entered?


Userlevel 2

First question asks for a list of people's names and dates of joining - both fields are input as text entries with the date in DD/MM/YYYY format.
Can I then pull two entries based on the dates that were entered (I want the most recent two dates) and pipe these into a later question?
Thank you.

icon

Best answer by rondev 13 May 2020, 08:18

View original

5 replies

Userlevel 7
Badge +22

As date comparison of long list will be little tricky and time consuming using survey flow, it is recommended to use JS to get the name and date of two recently joined people.

Userlevel 2

rondev any advice on how to do that? Sorry I'm not familiar with JS unfortunately..

Userlevel 7
Badge +22

On click of next button, read all the person name and their respective joining date as key value pair in js array. Sort based on the value of the js array. On sorted array get the key i.e. person name of first two element of array and store it in Embedded data.

Userlevel 2

Is there any other way besides using javascript?

Userlevel 2

rondev very helpful, thank you!

Leave a Reply