As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
// 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();