01-22-2013 10:54 AM
var carpeta = document;
var doc;
var i, j;
var esta;
var tipos = new Array();
var faltan = new Array();
var tiposDesc = new Array();
tipos[0] = "tdk:Solicitud1";
tipos[1] = "tdk:Solicitud2";
tipos[2] = "tdk:Solicitud3";
tipos[3] = "tdk:Solicitud4";
tipos[4] = "tdk:Fotocopias";
tiposDesc[0] = "Solicitud 1ra Hoja";
tiposDesc[1] = "Solicitud 2da Hoja";
tiposDesc[2] = "Solicitud 3ra Hoja";
tiposDesc[3] = "Solicitud 4ta Hoja";
tiposDesc[4] = "Fotocopia de DNI";
for (j = 0; j < tipos.length; j++)
{
esta = false;
for (i = 0; i < carpeta.children.length; i++)
{
doc = carpeta.children;
if(doc.isSubType(tipos[j])){
esta = true;
}
}
if (!esta){
faltan[faltan.length] = tipos[j];
}
}
esta = false;
for (i = 0; i < carpeta.children.length; i++)
{
doc = carpeta.children;
if(doc.isSubType(tipos[4])){
if (doc.properties["tdk:Fotocopias-TipoDNI"] == "SI"){
esta = true;
}
}
}
if (!esta){
faltan[faltan.length] = tiposDesc[4];
}
var carpetaFinal;
if (faltan.length == 0){
carpetaFinal = space.childByNamePath("Sitios/empresa/documentLibrary/Empresa/Legajos_Revisar");
logger.log("Estan todos");
}
else{
carpetaFinal = space.childByNamePath("Sitios/eadicard/documentLibrary/Empresa/Legajos_Incompletos");
carpeta.properties.description = "Faltan los siguientes tipos de documentos: " + faltan;
logger.log("Faltan los siguientes tipos de documentos: " + faltan);
}
carpeta.move(carpetaFinal);
01-29-2013 08:32 AM
01-29-2013 08:37 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.