Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!,
I 'm trying to make a partial reload of the following script:
PRODUCCION_TIMELINE:
Replace LOAD
codigoOP_PO as codigoOP_POPL,
maquina_PO as maquina_PO_POPL,
fechaInicioReal_PO as fechaInicioReal,
fechaFinReal_PO as fechaFinReal,
item_PO as item_PO_POPL,
codigoOP_PO &'-'& item_PO as CodigoItem,
if($(VariableDesde)>fechaInicioReal_PO and $(VariableDesde)<fechaFinReal_PO and fechaFinReal_PO<$(VariableHasta),$(VariableDesde),
if($(VariableDesde)<fechaInicioReal_PO and $(VariableHasta)>fechaFinReal_PO,date(fechaInicioReal_PO,'YYYY/MM/DD hh:mm:ss'),
if($(VariableDesde)<fechaInicioReal_PO and $(VariableHasta)<fechaFinReal_PO and $(VariableHasta)>fechaInicioReal_PO,date(fechaInicioReal_PO,'YYYY/MM/DD hh:mm:ss'),
if($(VariableDesde)>fechaInicioReal_PO and $(VariableDesde)<fechaFinReal_PO and $(VariableHasta)<fechaFinReal_PO,$(VariableDesde),'0')))) as fechaInicioVirtual,
if($(VariableDesde)>fechaInicioReal_PO and $(VariableDesde)<fechaFinReal_PO and fechaFinReal_PO<$(VariableHasta),date(fechaFinReal_PO,'YYYY/MM/DD hh:mm:ss'),
if($(VariableDesde)<fechaInicioReal_PO and $(VariableHasta)>fechaFinReal_PO,date(fechaFinReal_PO,'YYYY/MM/DD hh:mm:ss'),
if($(VariableDesde)<fechaInicioReal_PO and $(VariableHasta)<fechaFinReal_PO and $(VariableHasta)>fechaInicioReal_PO,$(VariableHasta),
if($(VariableDesde)>fechaInicioReal_PO and $(VariableDesde)<fechaFinReal_PO and $(VariableHasta)<fechaFinReal_PO,$(VariableHasta),'0')))) as fechaFinVirtual
resident PRODUCCION
where (($(VariableDesde)>fechaInicioReal_PO and $(VariableDesde)<fechaFinReal_PO and $(VariableHasta)>fechaFinReal_PO) OR
($(VariableDesde)<fechaInicioReal_PO and $(VariableHasta)>fechaFinReal_PO) OR
($(VariableDesde)<fechaInicioReal_PO and $(VariableHasta)<fechaFinReal_PO and $(VariableHasta)>fechaInicioReal_PO) OR
($(VariableDesde)>fechaInicioReal_PO and $(VariableDesde)<fechaFinReal_PO and $(VariableHasta)<fechaFinReal_PO));
where ' VariableDesde ' and VariableHasta 'are two date variables selected in the front end .
The idea is create a new table from ' PRODUCCION ' filtering between two dates, but can not get it to work.
I tried it with ' REPLACE ' ' ADD ' ' REPLACE ONLY ' ' ADD ONLY ' but still does not work .
Any idea to fix it?
Thanks.
It's hard to suggest without seeing the full script (specifically the part where your variables are defined), but try to add single quotes to your variables in the script:
$(VariableDesde) --> '$(VariableDesde)'
And what kind of error you are receiving during the load?
Regards,
Vlad
Hi Vlad,
The variables are created and assigned a value from an extension ' Calendar Date Picker ' as follows :
qlik.currApp().variable.create('VariableDesde');
qlik.currApp(t).variable.setContent( 'VariableDesde' , valFromAux);
To perform partial load I use an extension ' Qlik -Sense -Reload - Button' , the only error I receive is ' Partial Reload Failed' .
I looked at the logs and I get the following error: ' General Script Error '
With the total reload it works.
Thank you