Hello,
I hope someone can shed a light on this one.
I want to make a custom stamp and did everything likeits descriped in this forum. That is that i copied the code from the normal dynamic stamp and pasted it into the custom calc. script of my own stamp.
However, only the time and date appear, and not the name.
I used this one:
event.value = (new Date()).toString();
AFDate_FormatEx("h:MM tt, mmm dd, yyyy");
event.value = "By " + ((!identity.name || identity.loginName != (event.source.source || this).Collab.user) ? (event.source.source || this).Collab.user : identity.name)
+ " at " + event.value;
I filled out every field in the Identity fields.
What am I doing wrong?
It appears you have only the date since the JavaScript fails when it comes to the object "event.source.source", which has no properties.
The code "!identity.name" is false unless this item is not completed
Have you tested the parts of your alternate "if" statement to see if it evaluates to a logical value?
console.show();
evemt.value = util.printd("h:MM tt, mmm dd, yyyy", new Date() );
console.println("Date: " + sTest);
console.println("identity.name: " + identity.name);
console.println("!identity.name: " + !identity.name);
console.println("identity.loginName: " + identity.loginName);
console.println("this.Collab.user: " + this.Collab.user);
console.println("event.source.source: " + event.source.source);
console.println("this).Collab.user: " + this).Collab.user);
console.println("event.source.source || this.Collab.user: " + event.source.source || this.Collab.user);
event.value = "By " + ((!identity.name || identity.loginName != (event.source.source || this).Collab.user) ? (event.source.source || this).Collab.user : identity.name)
+ " at " + event.value;
George Kaiser