--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
var there = libByName("Schede");
var newEntry = new Object()
newEntry.["ID"] = entry().field("ID")
there.create(newEntry)
"schede" is the new library, and i tried to copy just the id to try, but it says "script error, canot call method "field" of null"
Surely i made a stupid error, can you help me?
It is new.Entry["ID"], and not new.Entry.["ID"]
Thx bill
can you telle me the correct form?
var ultimoTime = entry().field("Ultimo cambio azienda")
if (ultimoTime != null) newEntry["Ultimo cambio azienda"] = ultimoTime .getTime();
this worked!
everything is fine, i'm just waiting for vasya that is helping me with copy of "link to another library field"
i have a question: in this script i copy every field to another library, and i set an argument. ho can i copy the value of the argument to the new library?
var there = libByName("Schede");
var newEntry = new Object()
newEntry["Contratto del credito"] = entry().field("Contratto del credito")
newEntry["Contratto di agenzia"] = entry().field("Contratto di agenzia")
newEntry["Trattativa"] = arg(Trattativa)------------THIS ONE!!!
there.create(newEntry)
this is a small part of the script, i'm interested in the "arg" string (the ONE HIGHLIGHTED)
consider that in the mother library the argument is a "list of values", and in the son library the value chosen will go to a textbox
can you heelp me?
var newEntry = new Object()
newEntry["Contratto del credito"] = entry().field("Contratto del credito")
newEntry["Contratto di agenzia"] = entry().field("Contratto di agenzia")
newEntry["Trattativa"] = arg(Trattativa)------------THIS ONE!!!
there.create(newEntry)
this is a small part of the script, i'm interested in the "arg" string (the ONE HIGHLIGHTED)
consider that in the mother library the argument is a "list of values", and in the son library the value chosen will go to a textbox
can you heelp me?
so, when i click the button the script calls the argument that is a list of values from which i choose just one, then in the other library i want to copy that value in a textbox
var there = libByName("Schede");
var newEntry = new Object()
newEntry["Contratto del credito"] = entry().field("Contratto del credito")
newEntry["Contratto di agenzia"] = entry().field("Contratto di agenzia")
newEntry["Trattativa"] = arg(Trattativa).field()
there.create(newEntry)
how is the right way?
script error: type error: can't set string '-60097121148' to field Data di nascita (creazione scheda js#52)
it seems that it consider the date a string.....
i tried your suggested script but it's the same...
so i'll have:
mother library--date field
son library---text field (but with a date not a number)....
of course i have problem with syntaxis..
newEntry["Data nascita"] = entry().field("Data di nascita").moment().format('MMMM Do YYYY, h:mm:ss a')
where is the error? and then, i do not want hours second and minutes....
var newEntry = there.create(newEntry);
var links = entry() .field("Esperienze precedenti");
for ( var ent = 0 ; ent < links. length ; ent ++) {
newEntry.link("Esperienze precedenti" , link[ent]);
}
he told me i have to put it in the "mother" library, but after the element is created.
what does it mean?
where i have to put this part of the script?