Last modified in reference to specific field


#1

Hi,

I know how to add a field that shows the last time the whole record was modified. Is their any way, by a setting or a formula, to show the last time a specific field was updated?

Thanks!

Terri


#2

Hi Terri,

This can be done by setting default value.


#3

Hi, sorry I’m probably missing it, but I can’t figure out how to link it to another field?

Essentially, I would like a field that shows me the date that just the Status field was updated, not when the last change in the record was. Can you give some more advice please?

Thanks,

Terri


#4

Hi Terri,

Sorry that currently there’s no feature can record the last updated date & time to a certain field.


#5

Hi Terri,

May I ask if supporting right-click to check field value modification history would be helpful in your case? Or please let us know the use case that you would need to record it in a field.

Thank you!


#6

Hi Amy,

I don’t think it would be that helpful- we want to be able to run a report of reports that have had their status changed in the last X period of time, and I guess if it’s a right click option it wouldn’t appear in any reports?

We update different fields on the records quite regularly, so just using the generic “record updated” field doesn’t give us the information we need.

Thanks,

Terri


#7

#8

Hi,

This is exactly what I want (Although I think I’m also fine with it replacing the value as opposed to adding to it each time), but I can’t see from your post how you have achieved it. Can you help please?

Thanks,

Terri


#9

Hi, Terri
My post was just to say the way “using JavaScript”, by which we could record the field last update,
sorry, it’s not the tools of form design. but you can refer the javascipt code below, and change for your side .

//Post-workflow//
var myForm={
field1Id:1001389,
field1UpdateId:1001390,
field2Id:1001392,
field2UpdateId:1001393,
};

var current_time_string=date2str(new Date(), ‘yyyy/MM/dd hh:mm:ss’)

data_check(myForm.field1Id,myForm.field1UpdateId);
data_check(myForm.field2Id,myForm.field2UpdateId);

function data_check(fieldId,fieldUpdateId){
if ( param.getNewValue(fieldId)!=param.getOldValue(fieldId) ){
var recordId = param.getNewNodeId(1001391);//key_field_id_of_form
var query = db.getAPIQuery(’/demo/4’);//path_of_form
var entry = query.getAPIEntry(recordId);
var history=entry.getFieldValue(fieldUpdateId);
entry.setFieldValue(fieldUpdateId,history+param.getOldValue(fieldId)+’ > ‘+param.getNewValue(fieldId)+’ @’+current_time_string+’ By: ‘+user.getUserName()+’\r\n’ );
entry.save();
}
}

//usage:date2str(new Date(), ‘yyyy/MM/dd hh:mm:ss’)
function date2str(x, y) {
//account.getTimeZoneOffsetInHours();getTimeZoneOffset() in milliseconds.
var offset = account.getTimeZoneOffsetInHours();
x.setUTCHours(x.getUTCHours() + offset);

var z = {
M: x.getUTCMonth() + 1,
d: x.getUTCDate(),
h: x.getUTCHours(),
m: x.getUTCMinutes(),
s: x.getUTCSeconds()
};

y = y.replace(/(M+|d+|h+|m+|s+)/g, function(v) {
return ((v.length > 1 ? “0” : “”) + eval(‘z.’ + v.slice(-1))).slice(-2)
});

return y.replace(/(y+)/g, function(v) {
return x.getUTCFullYear().toString().slice(-v.length)
});
}