I cant get my values to be written away
I am trying to get a pop-up screen, where you can fill in data.
This data needs to get added into dynamic stamp.
But i cant get i presented ? can anyone help me ?
// JScript source code
function dialog()
{
var dialogDescriptor =
{
description:
{
name: "NTA Enexis test",
back_color: "windowBackground",
gradient_type: "darkToLight",
elements: [
{
type: "static_text",
name: "STATUS",
},
{
width: 200,
height: 22,
type: "popup",
item_id: "pop1",
},
{
type: "static_text",
name: "UITVOERDER",
},
{
width: 200,
height: 22,
type: "edit_text",
item_id: "pop2",
PopupEdit: true,
SpinEdit: true,
},
{
type: "static_text",
name: "REVISIE NR.",
},
{
width: 200,
height: 22,
type: "edit_text",
item_id: "pop3",
PopupEdit: true,
SpinEdit: true,
},
{
type: "static_text",
name: "PROJECT NR.",
},
{
width: 200,
height: 22,
type: "edit_text",
item_id: "txt1",
},
{
type: "ok_cancel",
ok_name: "MAAK STEMPEL",
cancel_name: "ANNULEREN",
}
]
},
initialize : function(dialog)
{
dialog.load({
"pop1": dialogObject.pop1,
"pop2": dialogObject.pop2,
"pop3": dialogObject.pop3,
"txt1": dialogObject.txt1,
});
},
validate : function(dialog)
{
//add validate code here
return true;
},
commit : function(dialog){ //oproepen wanneer OK drukt
var elements = dialog.store();
dialogObject.pop1 = elements["pop1"];
dialogObject.pop2 = elements["pop2"];
dialogObject.pop3 = elements["pop3"];
dialogObject.txt1 = elements["txt1"];
var results = dialog.store();
this.status = results[ "pop1"];
this.uitvoerder = results[ "pop2"];
this.versie = results[ "pop3"];
this.projectnr = results[ "txt1"];
},
"pop1" : function(dialog)
{
},
"pop2" : function(dialog)
{
},
"pop3" : function(dialog)
{
},
"txt1" : function(dialog)
{
},
};
var dialogObject =
{
pop1: ({CONCEPT:-1, DEFINITIEF:-2, DEMONTAGE:-3, GECONTROLEERD:-4, GOEDGEKEURD:-5, KOPIE:-6, NIEUW:-8, 'TER INFORMATIE':-9, VERVALLEN:-10, 'VIA REVISIE RETOUR':-7, 'VOOR AANBESTEDING':-11}),
pop2: ({ENGIE:-1, OMEXCON:-3, TECHNIP:-2}),
pop3: ({'0.1':-1, '0.2':-2, '0.3':-3, '0.4':-4, '0.5':-5, '0.6':-6, '0.7':-7, '0.8':-8, '0.9':-9, '1.0':-10, '1.1':-11, '1.2':-12, '1.3':-13, '1.4':-14, '1.5':-15, '1.6':-16, '1.7':-17, '1.8':-18, '1.9':-19, '2.0':-20}),
txt1: "",
execDialog: function() { return app.execDialog(dialogDescriptor); },
selectedItem: function (control) { if (typeof (control) === "string") { control = this[control]; } for (var item in control) { if (typeof (control[item]) === "object") { var r = this.selectedItem(control[item]);if (r !== undefined){ return r; }} else { if (control[item] > 0){return control[item];}}}} };
return dialogObject;
}
var d = dialog();
if(event.source.forReal && (event.source.stampName == "#yOjTiwY_NBmJz9E2d3yukC")) //kijken of stempel toegepast wordt, alleen deze
d.execDialog();
var cMsg = dialog.projectnr;
var cMsg1 = dialog.status;
var cMsg2 = dialog.uitvoerder;
var cMsg3 = dialog.status;
this.getField("PROJECT NR").value = cMsg;
this.getField("VERSIE").value = cMsg1;
this.getField("UITVOERDER").value = cMsg2;
this.getField("STATUS").value = cMsg3;
thank you in advance
