Hi, im using SmartClient version v11.0p_2016-04-12/EVAL Deployment
I have a DynamicForm which contains an item defined in this way:
{
ID: "cantiere_anagrafica_ct_data",
title: " ",
titleColSpan: 10,
colSpan: 40,
width: 640,
visibleWhen : {
_constructor : "AdvancedCriteria",
operator : "and",
criteria : [{
fieldName : "g0016",
operator : "equals",
value : true
}]
},
type: 'text',
editorType: 'StaticTextItem',
defaultValue: '<span class="section_header" style="text-align:center;">DATI DI CONTATTO</span>',
showTitle: true,
canEdit: false,
startRow:true
}
it is a StaticTextItem that needs to be shown only when field g0016 in the form record is true. The data I have in the form shows field g0016 to be false:
{
valuta:"S0018|0",
priorita:50,
g0032:false,
g0033:true,
g0030:false,
g0031:false,
importoOrdine:47.85,
pesoLordo:0.52000,
condizionePagamento:"S0018AG|126",
g0034:true,
dataOrdine: Date.parseServerDate(2016, 2, 31),
sedeEmissione_dsc:"001 SEDE OPERATIVA",
sconto:0.00,
wflStatus:"Evaso",
stringaPreventivi:"",
anagraficaCli_ggRitardoPagamento:0,
state:1,
cliente_dsc:"1271 ATMOSPHERE SRL 03220530368 03220530368",
valuta_dsc:"Euro",
sconto2:0.00,
clienteAK:"1271",
peso:0.44,
sconto3:0.00,
sconto4:0.00,
sconto5:0.00,
"this":"Evaso",
g0003:false,
g0004:false,
g0001:false,
g0002:false,
g0007:true,
g0008:false,
dataConsegnaRich: Date.parseServerDate(2016, 3, 8),
g0005:false,
g0006:true,
valoreCostoOrario:0.00,
cliente:"S0018|19837|1",
flagDestinazioneSpot:false,
costoImballo:0.00,
cliente_indirizzoFormattatoHtml:"VIA L.MURATORI,1<br />41012 Carpi (MO)",
contatti:"<div><span class="contatti"><img src="images/icons/building.png" title="Contatto principale"> : </span><span class="contatti"><img src="images/icons/telephone.png"> 059-684040 o 320-5586212</span> <span class="contatti"><img src="images/icons/printer_empty.png"> 0524/201057 Fidenza</span> <span class="contatti"><img src="images/icons/email.png"> gianmarco@atmosphereonline.it</span> </div>",
magazzino_dsc:"SEDE A.G.C. SRL",
condizionePagamento_dsc:"RIBA 30 GG FM ESCL.MESE 8/12 DATA POST 10",
cantiere_anagrafica_contattoAziendale_flagSpedizione:false,
importoOrdineIvato:58.38,
g0010:false,
g0011:false,
tipoOrdine:"V",
deletable:false,
g0014:false,
g0015:false,
g0012:false,
g0013:false,
g0018:false,
g0019:false,
g0016:false,
dataConsegnaConf: Date.parseServerDate(2016, 3, 8),
g0017:false,
valoreCentriCosto:0.00,
key:"S0018AG|16/00536",
cliente_anagraficaId_contattoAziendale_descrizioneCompattaHtml:"<nobr>Telefono: <b>059-684040</b></nobr>, <nobr>Telefono: <b>320-5586212</b></nobr>, <nobr>Fax: <b>0524/201057 Fidenza</b></nobr>, <nobr>Email: <b>gianmarco@atmosphereonline.it</b></nobr>",
g0021:false,
g0022:false,
editable:false,
numeroOrdine:"16/00536",
g0020:false,
g0025:false,
dataConferma: Date.parseServerDate(2016, 2, 31),
importoOmaggi:0.00,
g0026:false,
g0023:true,
cantiere_anagrafica_contattoAziendale_flagCommerciale:false,
g0024:false,
g0029:true,
subappalto:false,
sedeEmissione:"S0018AG|001",
g0027:false,
g0028:false,
magazzino:"S0018AG|SEDE",
cantiere_anagrafica_contattoAziendale_flagTecnico:false,
cantiere_anagrafica_contattoAziendale_flagAmministrazione:false,
trasportoPct:0.00,
trasporto:0.00,
defaultDescription:"16/00536 del 31/03/2016: ATMOSPHERE SRL"
}
I had this kind of problem with other two fields which were bound to the same data source value (same name). I have the need to display them in a mutually exclusive manner in different positions in the form with different prompts. In the docs I see that it is not possible to have two form fields bound to the same value (same name) so I removed the duplicates and arranged things differently.
In the case of the StaticTextItem above it has no name (it is "static" in the real sense...) and the form contains other items of this kind (static with no name). May this cause the visibility problem like in the other cases?
Thank you.
I have a DynamicForm which contains an item defined in this way:
{
ID: "cantiere_anagrafica_ct_data",
title: " ",
titleColSpan: 10,
colSpan: 40,
width: 640,
visibleWhen : {
_constructor : "AdvancedCriteria",
operator : "and",
criteria : [{
fieldName : "g0016",
operator : "equals",
value : true
}]
},
type: 'text',
editorType: 'StaticTextItem',
defaultValue: '<span class="section_header" style="text-align:center;">DATI DI CONTATTO</span>',
showTitle: true,
canEdit: false,
startRow:true
}
it is a StaticTextItem that needs to be shown only when field g0016 in the form record is true. The data I have in the form shows field g0016 to be false:
{
valuta:"S0018|0",
priorita:50,
g0032:false,
g0033:true,
g0030:false,
g0031:false,
importoOrdine:47.85,
pesoLordo:0.52000,
condizionePagamento:"S0018AG|126",
g0034:true,
dataOrdine: Date.parseServerDate(2016, 2, 31),
sedeEmissione_dsc:"001 SEDE OPERATIVA",
sconto:0.00,
wflStatus:"Evaso",
stringaPreventivi:"",
anagraficaCli_ggRitardoPagamento:0,
state:1,
cliente_dsc:"1271 ATMOSPHERE SRL 03220530368 03220530368",
valuta_dsc:"Euro",
sconto2:0.00,
clienteAK:"1271",
peso:0.44,
sconto3:0.00,
sconto4:0.00,
sconto5:0.00,
"this":"Evaso",
g0003:false,
g0004:false,
g0001:false,
g0002:false,
g0007:true,
g0008:false,
dataConsegnaRich: Date.parseServerDate(2016, 3, 8),
g0005:false,
g0006:true,
valoreCostoOrario:0.00,
cliente:"S0018|19837|1",
flagDestinazioneSpot:false,
costoImballo:0.00,
cliente_indirizzoFormattatoHtml:"VIA L.MURATORI,1<br />41012 Carpi (MO)",
contatti:"<div><span class="contatti"><img src="images/icons/building.png" title="Contatto principale"> : </span><span class="contatti"><img src="images/icons/telephone.png"> 059-684040 o 320-5586212</span> <span class="contatti"><img src="images/icons/printer_empty.png"> 0524/201057 Fidenza</span> <span class="contatti"><img src="images/icons/email.png"> gianmarco@atmosphereonline.it</span> </div>",
magazzino_dsc:"SEDE A.G.C. SRL",
condizionePagamento_dsc:"RIBA 30 GG FM ESCL.MESE 8/12 DATA POST 10",
cantiere_anagrafica_contattoAziendale_flagSpedizione:false,
importoOrdineIvato:58.38,
g0010:false,
g0011:false,
tipoOrdine:"V",
deletable:false,
g0014:false,
g0015:false,
g0012:false,
g0013:false,
g0018:false,
g0019:false,
g0016:false,
dataConsegnaConf: Date.parseServerDate(2016, 3, 8),
g0017:false,
valoreCentriCosto:0.00,
key:"S0018AG|16/00536",
cliente_anagraficaId_contattoAziendale_descrizioneCompattaHtml:"<nobr>Telefono: <b>059-684040</b></nobr>, <nobr>Telefono: <b>320-5586212</b></nobr>, <nobr>Fax: <b>0524/201057 Fidenza</b></nobr>, <nobr>Email: <b>gianmarco@atmosphereonline.it</b></nobr>",
g0021:false,
g0022:false,
editable:false,
numeroOrdine:"16/00536",
g0020:false,
g0025:false,
dataConferma: Date.parseServerDate(2016, 2, 31),
importoOmaggi:0.00,
g0026:false,
g0023:true,
cantiere_anagrafica_contattoAziendale_flagCommerciale:false,
g0024:false,
g0029:true,
subappalto:false,
sedeEmissione:"S0018AG|001",
g0027:false,
g0028:false,
magazzino:"S0018AG|SEDE",
cantiere_anagrafica_contattoAziendale_flagTecnico:false,
cantiere_anagrafica_contattoAziendale_flagAmministrazione:false,
trasportoPct:0.00,
trasporto:0.00,
defaultDescription:"16/00536 del 31/03/2016: ATMOSPHERE SRL"
}
I had this kind of problem with other two fields which were bound to the same data source value (same name). I have the need to display them in a mutually exclusive manner in different positions in the form with different prompts. In the docs I see that it is not possible to have two form fields bound to the same value (same name) so I removed the duplicates and arranged things differently.
In the case of the StaticTextItem above it has no name (it is "static" in the real sense...) and the form contains other items of this kind (static with no name). May this cause the visibility problem like in the other cases?
Thank you.
Comment