Get Date and Time
Posted: 27 Nov 2017
Good Morning,
We have an edit form with a number of fields that do not need to be edited by a user and that we want to display in a more user friendly way.
Two of these fields are as follows
Call Taken by - Single Client People Picker
Time Logged - Date & Time field
I have placed a HTML field on the form with the following code:
And then in JavaScript added the following function and called the function to run on Form Load: -
None of the above seems to work, I already have a forum post for the "Call Taken by" field, but equally I cannot get the values of the "Time Logged" field either.
This is on an edit form, but I will also need to use this on a display form to display the same information to the user.
Any help much appreciated.
We have an edit form with a number of fields that do not need to be edited by a user and that we want to display in a more user friendly way.
Two of these fields are as follows
Call Taken by - Single Client People Picker
Time Logged - Date & Time field
I have placed a HTML field on the form with the following code:
Code: Select all
<div id="callTakerDetails" style="white-space:nowrap;"></div>
Code: Select all
// Sets the Call Taker Display Field
function setCallTakerDisplay () {
var callTaker = fd.field('Call_x0020_Taken_x0020_By').value().dictionaryEntries[0].AccountName;
var dateLogged = fd.field('Time_x0020_Logged').value()[0];
var hourLogged = fd.field('Time_x0020_Logged').value()[1];
var minLogged = fd.field('Time_x0020_Logged').value()[2];
$("#callTakerDetails").html('<p style="font-size:14px; color:#4F81BD;"><b>Call Taken by - </b>' + callTaker + ' on ' + dateLogged + ' at ' + hourLogged + ':' + minLogged +'</p>');
}
This is on an edit form, but I will also need to use this on a display form to display the same information to the user.
Any help much appreciated.