I have a column in csv file named event_name and I am using Modified Java Script Value step to create new columns if the first character of event_name fufill conditions , for example :
event_name ="app_connection: connection_start_time = 10/05/2018 17:29:26: connection_end_time = 10/05/2018 17:29:29: connection_duration_in_seconds = 3"
==> event = app_connection
==> connection_start_time = 10/05/2018 17:29:26
==> connection_end_time = 10/05/2018 17:29:29
==> connection_duration_in_seconds = 3
if it's : event_name ="scene_access"
==> event = scene_access
I tried this code but it doesn't seem to change anything :
if(event_name.substr(0,3).equals("app"))
{
var event = event_name.substring(0,14);
var connection_start_time = event_name.substr(40,59);
var connection_end_time = event_name.substr(83,102);
var connection_duration_in_seconds = event_name.substr(137,139);
}
else
{
event_name = event_name;
}
If you could give me a hint or explaining what I'm missing will be a huge help. Thank you.

Aucun commentaire:
Enregistrer un commentaire