How do you display the time portion of a date/time field in a Vocalize widget? | XM Community
Solved

How do you display the time portion of a date/time field in a Vocalize widget?

  • 7 August 2020
  • 9 replies
  • 181 views

Badge

Is there a way to make the _time_ portion of either of the metadata date/time fields (i.e., Recorded Date or End Date) display in a Record Grid widget in Vocalize? I can only see the date portion of the field there.
Capture.PNG

icon

Best answer by KWigg 17 October 2020, 00:15

View original

9 replies

Badge

In these cases, where the data you would like in the dashboard is not a survey question, one solution would be to use "embedded data" in the survey flow. For example, when a survey question has an 'other' answer option and "allow text entry," create a new embedded data field, whose "value" will be the "allow text entry" response. Then in the dashboard, use this embedded data field as one of the fields and then pull this embedded data field into my dashboard.

Badge

The data is saved in the survey (from a metadata field). In the data set, I can see that it is a date/time field (i.e., time is included in the recorded response). However, I can not find a way to display the time portion of the recorded response in a Vocalize widget. See the attached snip above - the record grid widget only displays in the date portion of the field. Dashboard users need to know the time.

Badge +9

Turns out that capability isn't available at this time (I just opened a ticket for it); the time stamp can be present when viewing the "show full response" of a record, but you can't see them listed like you're proposing.
I've added to the CX Dashboard Product Ideas for time stamps to be usable within Dashboards - give it an upvote! ;)

Badge

I would like to add the time stamp as well to the dashboard. I did see that if you go under Reports within the Survey, it does display the date AND time together.

Badge +9

Yes - the addition of the time stamp is new - though I don't think it's been fully ironed out, just yet. Baby steps 🙂

Userlevel 5
Badge +11

Hi All,

I've just been trying to do this and used some JavaScript to add the time part to a field. So for example, 08:32 and 14:56. The trouble is I now need to bucket / group these fields into a workable grouping and I thought it would be possible but the bucketing option in the Data & Analysis section can't handle the list as it's too long (only 1440 at most but still can't handle it!). I also tried changing the field option from text / text set to a number in the survey flow but as it's got a colon : and not a dot . it isn't recognised as a number and therefore bucking won't work again. I also tried Date as an option in the survey flow but that didn't work either.
image.pngAny thoughts on this - I'm so close to getting a work around. Perhaps in JavaScript you could manipulate the string and replace it with a . but then it would be seen as a decimal and not a true time. But I guess as you are bucking it it wouldn't matter too much?
Can anyone suggest the best way to replace : with . in my code
or
I'm aware that date and time have certain characters like T and Z in them. Can you trick Qualtrics somehow I'm wondering
//add this to the addOnReady section
//Set up the below embedded fields in the survey flow behfore this block
//this returns the day of the week and time of the day
//Helpful source: https://www.qualtrics.com/community/discussion/1607/inserting-month-as-piped-text
//Helpful source: https://stackoverflow.com/questions/24998624/day-name-from-date-in-js/24998705
var curDate = "${date://CurrentDate/DM}";
var dayName = curDate.toString().split(', ')[0];
Qualtrics.SurveyEngine.setEmbeddedData( 'Recorded_Day_Of_The_Week', dayName );
Qualtrics.SurveyEngine.setEmbeddedData( 'Recorded_Time_Of_The_Day', '${date://CurrentTime/MT}' );
In addition, I'm a little unsure as to whether this takes into account of Daylight Saving Time (eg BST).

One other point, using this JavaScript method means it's not possible to amend the already recorded values easily.

Thanks

Rod Pestell

Userlevel 5
Badge +11

https://www.qualtrics.com/community/discussion/comment/31208#Comment_31208Can you provide a link?

Userlevel 5
Badge +11

Just a thought (and something I've just setup and found it's a good enough work around!).... What I've done for the time being is in the Dashboard settings I imported a recode file giving all the time in minutes for 24 hours and then used the formula floor(,1/24/2) to give it in half hour increments.

Good enough for now! :)
image.png
Thanks

Rod Pestell

Userlevel 5
Badge +11

I'm aware that date and time have certain characters like T and Z in them. Can you trick Qualtrics somehow I'm wondering


Just noticed, the duration survey metafield column knows it's a number as I was able to use a bucketing field to group the times together. So how do they write the actual duration value in the raw data? I am suspecting they have it as a decimal in seconds.milliseconds and then format it for display seeing that the title says (in seconds) but clearly it's been converted to hours:minutes:seconds
image.png

Leave a Reply