01-29-2008 03:45 PM
// First we read the document to find the values
var Sociedad ="";
var CIF ="";
var FileContent = document.content;
var FileLines = FileContent.split("\n");
var Lines=0;
var words;
var foundSociedad = False;
var foundtradoCIF = False;
while ((foundSociedad == False) || (foundtradoCIF == False)) && (Lines <= FileLines.length)
{
var Word_Count=0;
words = FileLines[Lines].split(" ");
while ((foundSociedad == False) || (foundtradoCIF == False)) && (Word_Count <= words.length)
{
if (words[Word_Count] =="Sociedad:")
{
foundSociedad = True;
Sociedad = words[(Word_Count +1)];
}
if (words[Word_Count] =="CIF:")
{
foundtradoCIF = True;
CIF = words[(Word_Count +1)];
}
Word_Count=Word_Count+1;
}
Lines = Lines+1;
}
// Now that we have the values we apply them to the properties of the custom type.
document.properties.name="Doc_"+Sociedad+"_"+CIF;
document.properties["custom:CompanyName"]=Sociedad;
document.properties["custom:CompanyCIF"]=CIF;
document.save();
08-07-2008 03:18 AM
08-07-2008 03:31 AM
08-07-2008 03:38 AM
08-08-2008 03:37 AM
08-08-2008 03:54 AM
08-08-2008 08:28 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.