[Isis-users] ABCD 2.2 - picklist type subfield: BD

Guilda Ascencio guildaa at gmail.com
Thu Mar 18 18:30:07 CET 2021


Hola Edwin. Por favor verifica si el problema de asociar a un subcampo
listas de términos provenientes de un tesauro o de otra base de datos está
resuelto

campos.php va en *central/dataentry*
editarocurrencias.js.txt va en* central/dataentry/js*. Luego de copiarlo
eliminas la extensión .txt. Debe quedar *editarocurrencias.js*
index.php va en *central/tesaurus*

Cualquier cosa me avisas

Saludos



On Fri, Mar 12, 2021 at 11:01 AM Edwin Hübner <edwin.hubner at gmail.com>
wrote:

> Gracias, Guilda.
> Saludos
> Edwin Hübner
> (5521)99647-1675
>
>
> Em sex., 12 de mar. de 2021 às 14:00, Guilda Ascencio <guildaa at gmail.com>
> escreveu:
>
>> Hola Edwin.  No lo he podido revisar. Esta semana lo hago.  Saludos
>>
>> On Thu, Mar 11, 2021 at 12:38 PM Edwin Hübner <edwin.hubner at gmail.com>
>> wrote:
>>
>>> Hola Guilda,
>>> Le pregunto si recibió mi correo electrónico del 23 de febrero, sobre el
>>> problema de la piclist de otra base de datos, cuando está vinculado a un
>>> subcampo de marc, con tipo de entrada de texto y NO tabla. Necesito saber
>>> si habrá una solución a este problema.
>>> Gracias
>>> Edwin Hübner
>>> (5521)99647-1675
>>>
>>>
>>> Em ter., 23 de fev. de 2021 às 13:36, Edwin Hübner <
>>> edwin.hubner at gmail.com> escreveu:
>>>
>>>> Hi Guilda,
>>>> Thank you for your tests and answers.
>>>> You are right. It works when we define the field with "Input type" as
>>>>  Table. But in the MARC format, the fields that have indicators, need to be
>>>> defined with "Input type" as text. In this case it only works if the
>>>> picklist from another database is in relation to a field as a whole, but it
>>>> does NOT work when we want to pic  form another database to a specific
>>>> subfield. For example:
>>>>
>>>> 1. Definition in the FDT/FMT.
>>>> T|650|Assunto - Termo Tópico|0|1|12avxyz||X|2|150|||||||1||1|0|||
>>>> S||Ind|0|0|1||S||1|P|650-ind1.tab|||||0||0|0|||
>>>> S||Ind|0|0|2||S||1|P|650-ind2.tab|||||0||0|0|||
>>>> S||Termo tópico|0|0|a||X|||D|tesauro|AT_|@autoridades.pft|||0||0|0|||
>>>> S||Subdivisão de Forma|0|1|v||X|||D|tesauro|AV_|v185^v|v185^v||0||0|0|||
>>>> S||Subdivisão geral|0|1|x||X|||D|tesauro|AX_|v180^x|v180^x||0||0|0|||
>>>> S||Subdivisão
>>>> cronológica|0|1|y||X|||D|tesauro|AY_|v182^y|v182^y||0||0|0|||
>>>> S||Subdivisão
>>>> geográfica|0|1|z||X|||D|tesauro|AG_|v151^a|v151^a||0||0|0|||
>>>>
>>>> 1. As it appears in the Worksheet of ABCD 1.5.1.
>>>>
>>>> [image: image.png]
>>>>
>>>> 2. As it appears in the workshee of ABCD 2.2
>>>>
>>>> [image: image.png]
>>>> Regards
>>>> Edwin Hübner
>>>> (5521)99647-1675
>>>>
>>>>
>>>> Em qua., 17 de fev. de 2021 às 12:14, Guilda Ascencio <
>>>> guildaa at gmail.com> escreveu:
>>>>
>>>>> I've been testing the issue and it seems to work well.  If I
>>>>> understand correctly you are trying to pick a subfield from another
>>>>> database. I suppose the dataentry looks like
>>>>>
>>>>> [image: image.png]
>>>>>
>>>>> And the e subfield comes from another database.  In this case the FDT
>>>>> of the main database must have
>>>>>
>>>>> [image: image.png]
>>>>>
>>>>> autoridades.pft for the main data base must have the line:
>>>>>  case 3:
>>>>> v3^a,"/"v3^b,"/"v3^c,"/"v3^d,"/"v3^e,"/"v3^f'$$$'"^a"v3^a,"^b"v3^b,"^c"v3^c,"^d"v3^d,
>>>>>
>>>>> and autoridades pft of the cutter database must have the line
>>>>> case 1: v1^a'$$$'v1^b
>>>>> and the field 1 is indexed as 1 0 "CUT_"v1^a
>>>>>
>>>>> This is an example.
>>>>>
>>>>> Just in case I'm sending dataentry/capturaclaves.php
>>>>>
>>>>> On Mon, Feb 15, 2021 at 9:45 AM Edwin Hübner <edwin.hubner at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Piet,
>>>>>> I wonder if you or someone else has tested the problem previously
>>>>>> reported by Mônica and me. It seems that it is a problem of version 2.2,
>>>>>> because in version 1.5.1 it works perfectly.
>>>>>> Thanks in advance for an answer
>>>>>> Edwin Hübner
>>>>>> (5521)99647-1675
>>>>>>
>>>>>>
>>>>>> Em sáb., 13 de fev. de 2021 às 14:19, Mônica <tnica01 at gmail.com>
>>>>>> escreveu:
>>>>>>
>>>>>>> Piet,
>>>>>>>
>>>>>>> Thank you for your answer. I hope the problem is resolved in the
>>>>>>> next update.
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Monica
>>>>>>>
>>>>>>> Em sáb, 13 de fev de 2021 07:49, Piet De Keyser <
>>>>>>> piet.dekeyser at ucll.be> escreveu:
>>>>>>>
>>>>>>>> Monica,
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Yes, your right. When I select a name from the dictionary, e.g.
>>>>>>>> Smith, John, it takes the whole thing into the field, inclusiv the
>>>>>>>> indicator and subfield delimiter, e.g.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 1 ^aSmith, John
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Not so in the subfield. There was some discussion on this list
>>>>>>>> about the authoridades.pft, but I think it was in view of the new opac.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Piet
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Verzonden vanuit Mail
>>>>>>>> <https://go.microsoft.com/fwlink/?LinkId=550986> voor Windows 10
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> *Van: *Mônica <tnica01 at gmail.com>
>>>>>>>> *Verzonden: *zaterdag 13 februari 2021 1:32
>>>>>>>> *Aan: *Piet De Keyser <piet.dekeyser at ucll.be>; CDS-ISIS list
>>>>>>>> <isis-users at iccisis.org>
>>>>>>>> *Onderwerp: *Re: [Isis-users] ABCD 2.2 - picklist type subfield: BD
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Hello Piet,
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> If I use the search function from the entire field and not from the
>>>>>>>> subfield (that is, without first opening the subfields), the term selected
>>>>>>>> in the dictionary is loaded correctly into field 90. I think the problem
>>>>>>>> only happens in the subfield of version 2.2:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Em sex., 12 de fev. de 2021 às 19:50, Piet De Keyser <
>>>>>>>> piet.dekeyser at ucll.be> escreveu:
>>>>>>>>
>>>>>>>> Monica,
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Your entry box is rather small. What happens if you user the
>>>>>>>> look-up function starting from the whole field and not from the subfield
>>>>>>>> (i.e. without first opening the subfields)?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Piet
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Verzonden vanuit Mail
>>>>>>>> <https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=04%7C01%7C%7C72f078a0e5d1473788ce08d8cfb6d9e1%7Ce638861b15d94de6a65db48789ae1f08%7C0%7C0%7C637487731540292758%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=COayvlJJAYvK5Ej3gPsXyqIG6QaCqKPu4%2FwykNV00%2BA%3D&reserved=0>
>>>>>>>> voor Windows 10
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> *Van: *Mônica <tnica01 at gmail.com>
>>>>>>>> *Verzonden: *vrijdag 12 februari 2021 22:50
>>>>>>>> *Aan: *Piet De Keyser <piet.dekeyser at ucll.be>
>>>>>>>> *CC: *CDS-ISIS list <isis-users at iccisis.org>
>>>>>>>> *Onderwerp: *Re: [Isis-users] ABCD 2.2 - picklist type subfield: BD
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Hello Piet,
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> The author notation "A124" is selected from a dictionary of terms
>>>>>>>> to be inserted into the field 90$b.
>>>>>>>> The problem is only in version 2.2. For example: When selecting the
>>>>>>>> author's last name (Abbe) that corresponds to the notation A124 in the
>>>>>>>> dictionary of database terms, the term is not loaded in the field. It is
>>>>>>>> blank.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Em sex., 12 de fev. de 2021 às 17:26, Piet De Keyser <
>>>>>>>> piet.dekeyser at ucll.be> escreveu:
>>>>>>>>
>>>>>>>> Monica,
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> It is not very clear to me: here A124 comes into the field? Is the
>>>>>>>> problem this value or that is it not in a subfield, but in the field as
>>>>>>>> such?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Piet de Keyser
>>>>>>>>
>>>>>>>> Belgium
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Verzonden vanuit Mail
>>>>>>>> <https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=04%7C01%7C%7C72f078a0e5d1473788ce08d8cfb6d9e1%7Ce638861b15d94de6a65db48789ae1f08%7C0%7C0%7C637487731540297732%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=s4QFjWDbK7g87eBMjsJ9Sdc%2B8%2Bei6VSGzZ0cYGPy1H8%3D&reserved=0>
>>>>>>>> voor Windows 10
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> *Van: *Mônica <tnica01 at gmail.com>
>>>>>>>> *Verzonden: *vrijdag 12 februari 2021 19:50
>>>>>>>> *Aan: *CDS-ISIS list <isis-users at iccisis.org>
>>>>>>>> *Onderwerp: *[Isis-users] ABCD 2.2 - picklist type subfield: BD
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Dear colleagues,
>>>>>>>>
>>>>>>>> In ABCD version 2.2, I cannot search a database in a picklist type
>>>>>>>> subfield: BD.
>>>>>>>> When I click on the magnifier icon (Dictionary of terms in the
>>>>>>>> database) the terms appear. However, when I select it the term is not
>>>>>>>> loaded in the subfield:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> In version 1.5.1 the search for the database in the subfield is
>>>>>>>> working correctly:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Please, how can I fix the problem?
>>>>>>>>
>>>>>>>> Sincerely,
>>>>>>>>
>>>>>>>> Monica
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> isis-users mailing list
>>>>>>> isis-users at iccisis.org
>>>>>>> To manage your own subscription options go to:
>>>>>>> http://lists.iccisis.org/listinfo/isis-users
>>>>>>> Or contact Henk Rutten: hlrutten at xs4all.nl
>>>>>>>
>>>>>> _______________________________________________
>>>>>> isis-users mailing list
>>>>>> isis-users at iccisis.org
>>>>>> To manage your own subscription options go to:
>>>>>> http://lists.iccisis.org/listinfo/isis-users
>>>>>> Or contact Henk Rutten: hlrutten at xs4all.nl
>>>>>>
>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20210318/18e97bf8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 7139 bytes
Desc: not available
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20210318/18e97bf8/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 18547 bytes
Desc: not available
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20210318/18e97bf8/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 27664 bytes
Desc: not available
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20210318/18e97bf8/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 34852 bytes
Desc: not available
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20210318/18e97bf8/attachment-0003.png>
-------------- next part --------------


  var valoresCampo=new Array(200)    /* para colocar las ocurrencias del campo */
  var SubCampos=new Array(23)        /* para colocar el desglose de los subcampos del campo */
  var TagCampo=window.opener.document.forma1.TagActivo.value
  var lista_sc=Array()
  document.forma1.tagcampo.value=window.opener.document.forma1.valor.value  /* Fdt del campo */
//  alert(document.forma1.tagcampo.value)
  document.forma1.occur.value=window.opener.document.forma1.occur.value  /* no. de ocurrencias del campo */
  document.forma1.ep.value=window.opener.document.forma1.ep.value    /* indice en proceso */
  document.forma1.NoVar.value=window.opener.document.forma1.NoVar.value  /*indice al input type=text en proceso*/
  Contenido=window.opener.document.forma1.conte.value   /*Contenido del campo*/
  SubC=window.opener.document.forma1.SubC.value   /*Desglose de los subcampos del campo (valores tomados del archivo FDT*/
  Repetible=window.opener.document.forma1.Repetible.value
  Formato=window.opener.document.forma1.Formato_ex.value   //Formato para extracción de las listas de autoridades
// se elimina la primera línea que que ella contiene la descripción total del campo

	var tag=""
	var X_tag=""
  	X_tag="document.forma1."+TagCampo

	document.forma1.base.value=window.opener.document.forma2.base.value
	document.forma1.cipar.value=window.opener.document.forma2.cipar.value
    base=document.forma1.base.value
  	cipar=document.forma1.cipar.value
	ixpos=SubC.indexOf("\n")
	SubC=SubC.substr(ixpos+1)
  Valores=window.opener.document.forma1.conte.value
  Occ=window.opener.document.forma1.occur.value
  if (Occ==0) {Occ=1}
  i=window.opener.document.forma1.ep.value

   SubCampos = SubC.split("\n")
   nSC=SubCampos.length
/* se obtiene el arreglo de las ocurrencias del campo */

   valoresCampo = Contenido.split("\n")

/* Se crea el Select para las ocurrencias del campo */
   Titulo=window.opener.NombreC
 //  document.writeln(Titulo)
   Tx=Titulo.split('|')
   Tx_Rep=Tx[4] // para ver si el campo es repetible
   document.write("<table width=700 cellpadding=0 cellspacing=0>")
   if (Trim(Tx[17])!=""){
   		document.write("<td class=mmed0 colspan=2><a href='javascript:Ayuda(\"\",\""+Tx[17]+"\")'><img src=img/question.gif border=0></a>")
   }else{
   		if (Tx[16]==1)
   			document.write("<td class=mmed0 colspan=2><a href='javascript:Ayuda("+Tx[1]+",\"\")'><img src=img/question.gif border=0></a>")
   }
   document.write("<b><font size=2>"+Tx[2]+"("+Tx[1]+")</b></td> ")
   Occ=valoresCampo.length

   if (Occ>5){kOc=5} else {kOc=Occ}
   document.write('<tr><td valign=top width=80 >')
   if (Tx_Rep==1){
   		if (Repetible=="R") document.write("<a href=javascript:AgregarOcurrencia()><img src=img/add.gif border=0 Alt='agregar ocurrencia'></a>  ")
   		document.write("<a href=javascript:EliminarOcurrencia()><img src=img/delete_occ.gif border=0 Alt='eliminar ocurrencia seleccionada'></a>")
  	 	if (Repetible=="R") document.write("<a href=javascript:SubirOcurrencia('lista')><img src=img/up.gif border=0></a>")
   		if (Repetible=="R") document.write("<a href=javascript:BajarOcurrencia('lista')><img src=img/down.gif border=0></a>  ")
   }
   document.writeln("</td>")
   document.write("<td><select name=lista style='width:550px;background-color=#F2F6F8;'  size="+kOc+" onClick=\"javascript:TerminoSeleccionado();\">")
   for (j=0; j<=Occ-1; j++) {
       document.write("   <option  ")
       if (j==0) {document.write(" selected ")}
		cc=""
		valores=""
		if (Trim(valoresCampo[j])!="")
			valores=valoresCampo[j].replace(/\"/g, """)
       	document.write(" value=\""+valores+"\">"+valores)
   }
   document.writeln('</select></td></table><br>')

/* Tabla para colocar los subcampos de la ocurrencia */





// Esta linea se agrega para obligar que el objeto "tag" siempre sea un arreglo aún cuando sea un solo subcampo
	document.writeln("<input type=hidden name=tag"+tag+" value=''>")

function returnObjById( id )
{
    if (document.getElementById)
        var returnVar = document.getElementById(id);
    else if (document.all)
        var returnVar = document.all[id];
    else if (document.layers)
        var returnVar = document.layers[id];
    return returnVar;
}

function Redraw(xsalida,newSc,add_name){
// si no hay indicadores pero el campo los debe tener se abren las dos casillas en blanco
	inctr=""
	indicadores=""
	if (!is_marc=="S"){
		if (xsalida=='' || xsalida=='^-'){
			for (i=0;i<Tx[5].length;i++){
				sc=Tx[5].substr(i,1)
				xsalida+='^'+sc
			}
		}
	}else{
		if (Tx[5].substr(0,1)==1 && is_marc=="S"){
			ixpos=xsalida.indexOf('^')
			if (ixpos!=2)
				indicadores='  '
			else
				indicadores=xsalida.substr(0,ixpos)
			xsalida=xsalida.substr(ixpos)
			xsalida='^I1'+indicadores.substr(0,1)+'^I2'+indicadores.substr(1,1)+xsalida
		}
	}
	campos=xsalida.split('^')
	vc=Array()
	icampos=-1
	// se coloca en un arreglo el contenido de los campos
	for (i=1;i<campos.length;i++){
		if (campos[i]!=""){
			if (i<3 && indicadores!=""){
				cc=campos[i].substr(0,2)
				len_c=2
			}else{
				cc=campos[i].substr(0,1)
				len_c=1
			}
			if (cc in vc){
				vc[cc]=vc[cc]+'$$$$$'+campos[i].substr(len_c)
			}else{
				vc[cc]=campos[i].substr(len_c)
			}
		}
	}
	M=-1
	strsubc=""
	html="<table border=0 cellspacing=1 class=\"listTable\">"
	inicio=""
	Desc_sc=Array()
// se obtiene el nombre de los subcampos para el select del ADD
	campocompleto=""
	for (i=0;i<Tx[5].length;i++){
		key=Tx[5].substr(i,1)
		key_sc=key
		if (i<2 && indicadores!="") key="I"+key
		if (key in vc){
			c=vc[key].split('$$$$$')
			if (vc[key]!=""){
				for (icc=0;icc<c.length;icc++){
					campocompleto+="^"+key_sc+c[icc]
				}
			}else{
				campocompleto+="^"+key_sc
			}
		}else{
			campocompleto+="^"+key
		}
	}
	campos=campocompleto.split('^')
	for (i=0;i<Tx[5].length;i++){
		xd=SubCampos[i].split('|')
		if ((xd[5]==1 || xd[5]==2) && i<2 && is_marc=="S"){
            ix="I"+xd[5]          //ADD THE LETTER I TO THE INDICATOR CODE FOR NOT CONFUSING WITH SUBFIELD 2
            Desc_sc[ix]=xd[2]
		}else{
			Desc_sc[xd[5]]=xd[2]
		}
	}
    sc_ant=""
    len=campos.length
	for (i=1;i<len;i++){
        new_subc=campos[i].substr(0,1)
        list_subc=Tx[5].substr(i-1,1)
        pick=""
        //SE OBTIENE LAS CARACTERISTICAS DEL SUBCAMPO
        for (j=0;j<Tx[5].length;j++){
        	sc=SubCampos[j].split('|')
        	tipoe=sc[7]
        	Ind=""
        	if (i<3 && (sc[5]==1 || sc[5]==2) && is_marc=="S")
        		Ind="I"
        	if (sc[5]==new_subc){
        		ind_pick=Ind+sc[5]
        		if (ind_pick in PickList)
        			pick=PickList[ind_pick]
        		break
        	}
        }

        valor=""

        if (campos[i].length>1)
        	valor=campos[i].substr(1)
        else
        	valor=""
        M++
		html+="<tr onmouseover=\"this.className = 'rowOver';\" onmouseout=\"this.className = '';\">\n"
        html+="<td nowrap valign=top >"
        if (sc[16]=="1" || Trim(sc[17])!=""){

        	if (Trim(sc[17])!=""){
        		html+="<a href='javascript:Ayuda(\"\",\""+sc[17]+"\")'><img src=../dataentry/img/question.gif border=0 align=top width=16></a>"
        	}else{
        		html+="<a href=javascript:Ayuda('"+Tx[1]+"_"+new_subc+"','')><img src=../dataentry/img/question.gif border=0 align=top width=16></a>"
        	}
        }
        html+=new_subc
        C_Sc=new_subc
        strsubc+=new_subc
       	lista_sc[M]="t"+C_Sc+"_"+M
        ixsc=Tx[5].indexOf(list_subc)
//        alert(C_Sc)
        if (is_marc!="S" || i>2 || (C_Sc!=1 && C_Sc!=2)){
        	if (C_Sc!="-"){
        		if (sc_ant!="-"){
        			html+="<a href=javascript:SubirSubc('t"+C_Sc+"_"+M+"')><img src=img/up.gif border=0></a>"
                   	html+="<a href=javascript:BajarSubc('t"+C_Sc+"_"+M+"')><img src=img/down.gif border=0></a>"
    			}else{
    				sc_ant=""
    				html+="<a href=javascript:BajarSubc('t"+C_Sc+"_"+M+"')><img src=img/down.gif border=0></a>"
    			}
    			ixsc=Tx[5].indexOf(new_subc,2)
    		}else{
    			sc_ant="-"
    		}
      	}

        if (sc[12]!=""){
	   		prefijo=sc[12]
           	iSc=sc[5]
           	Formato=sc[13]
           	db_link=sc[11]
           	if (db_link=="") db_link=base

           	cipar_link=db_link+".par"
	   		link="  <a href='javascript:AbrirIndiceAlfabetico(\"t"+C_Sc+"_"+M+"\",\""+prefijo+"\",\""+iSc+"\",\"S\""+",\""+db_link+"\""+",\""+cipar_link+"\""+",\""+TagCampo+"\""+",\""+Formato+"\")'><img src=img/setsearch.gif border=0 align=center></a><font color=red>"

			if (sc[7]!="I" && sc[10]=="T") {
				link+=" <a href='javascript:AbrirTesauro(\"t"+C_Sc+"_"+M+"\",\""+db_link+"\",\"DE_\",\"0\")'><img src=../dataentry/img/toolbarTesaurus.gif></a> ";
			}
		}else{                                                                                                                                                                                  		link=""
		}
		if (link!="") html+="<font color=darkblue>"+link+"</a>"
	   	html+="</td>"
	   	//link=""
	   	//GET THE SUBFIELD NAME
       	ixnamec=Tx[5].indexOf(C_Sc)
       	if (is_marc=="S" && (C_Sc==1 || C_Sc==2) && i<3 ){
       		NombreSc=Desc_sc["I"+C_Sc]        //GET THE NAME OF THE INDICATOR
       	}else{
       		NombreSc=Desc_sc[C_Sc]            //GET THE NAME OF THE SUBFIELD
       	}
        html+="<td  valign=top>"+NombreSc+"</a></td>"
       	html+="<td class=td nowrap>"
       	xsize="70"
       	if (is_marc=="S" && i<3 && (C_Sc==1 || C_Sc==2)){
       		xsize="1 maxlength=1"
       		NamePick="I"+C_Sc
       	}else{
       		NamePick=C_Sc
       	}
        if (link!=""){
        	pick=""
        }
       	if (pick!=""){
       		NombreCampo="t"+C_Sc+"_"+M;
       		html+=" <select name="+TagCampo+" id=t"+C_Sc+"_"+M+"><option value=' '> </option>\n"
       		opt=pick.split('$$$$')
       		selected=""
       		for (var ixopt in opt){
       			if (Trim(opt[ixopt])!=""){
	       			o=opt[ixopt].split('|')
	       			if (Trim(o[1])=="") o[1]=o[0]
	       			if (Trim(valor)==Trim(o[0]))  selected= " selected"
	       			if (o[5]!="-")
	             		html+="<option value='"+o[0]+"' "+selected+">"+o[1]+"</option>\n"
	             	selected=""
	           	}
			}
            html+="</select>\n";
            picklist=NamePickList[NamePick]
            if (act_picklist=="Y")
            	html+= " <a href=\"javascript:AgregarPicklist('"+picklist+"','"+NombreCampo+"','$campo')\"><img src=img/s2.gif alt='"+mod_picklist+"' title='"+mod_picklist+"' border=0></a>"
			html+= " <a href=\"javascript:RefrescarPicklist('"+picklist+"','"+NombreCampo+"','$campo')\"><img src=img/reset.gif alt='"+reload_picklist+"' title='"+reload_picklist+"' border=0></a>   ";
       	}else{
       		switch (sc[7]){
       			case "U":
       				msgupload="Subir"
       				msgseleccionar="Seleccionar"
       				NombreCampo="t"+C_Sc+"_"+M;
       				html+="<input type=text class=SubC  size="+xsize+" name="+NombreCampo+" id=t"+C_Sc+"_"+M+" value='"+valor+"' >"
       				html+=" <a href=javascript:EnviarArchivo('"+NombreCampo+"','"+sc[7]+"')><img src=../dataentry/img/upload.gif border=0 alt=\""+msgupload+"\" title=\""+msgupload+"\" align=top></a>\n"
       				html+=" <a href='javascript:msgwin=window.open(\"dirs_explorer.php?Opcion=seleccionar&tag="+NombreCampo+"&base="+base+"\",\"Explore\",\"width=300,height=500,left=500,scrollbars,resizable,toolbar=yes\");msgwin.focus()'><img src=../dataentry/img/item_chk1.gif border=0 alt=\""+msgseleccionar+"\" title=\"".msgseleccionar+"\" align=top></a> "
       				break
       			default:
       				if (valor.indexOf("'")==-1)
	       				html+="<input type=text class=SubC  size="+xsize+" name="+TagCampo+" id=t"+C_Sc+"_"+M+" value='"+valor+"' >          "
	       			else
	       				html+="<input type=text class=SubC  size="+xsize+" name="+TagCampo+" id=t"+C_Sc+"_"+M+" value=\""+valor+"\" >          "+valor
       		}
       	}
        subc_r="S"
       	if (subc_r!="S" || (i>2 || C_Sc!=1 && C_Sc!=2 && subc_r=="S")){
       		//html+="at"+C_Sc+"_"+M
	    	if (subc_r=="S"){
	    		html+="<select name=agregar id=at"+C_Sc+"_"+M+" onChange=AgregarSubcampo(this,"+j+") style=width:100px>"
  				html+="<option value=''>add"
    			for (ia=0;ia<Tx[5].length;ia++){
     				sca=Tx[5].substr(ia,1)
       				if (ia>1 || (Tx[5].substr(0,1)!=1 && Tx[5].substr(0,1)!=2))
       					if (sca!="-")
           					html+="<option value="+Tx[5].substr(ia,1)+">"+Tx[5].substr(ia,1)+" "+Desc_sc[sca]
        		}
        		if (C_Sc!="-"){
	        		html+="</select>  <a href=javascript:DeleteSubfield('t"+C_Sc+"_"+M+"')><img src=../dataentry/img/delete_occ.gif border=0 ></a>"
        		}
        	}
        }
	}

	html+="</table>"
	elem = document.getElementById("asubc");

	elem.innerHTML = html;
}

function BajarOcurrencia(id){
	ix=document.forma1.lista.selectedIndex
	if (ix==-1 || ix>=document.forma1.lista.options.length) return
	ocurren=document.forma1.lista.options[ix+1].value
	txt_ocurren=document.forma1.lista.options[ix+1].text
	document.forma1.lista.options[ix+1].value=document.forma1.lista.options[ix].value
	document.forma1.lista.options[ix+1].text=document.forma1.lista.options[ix].text
	document.forma1.lista.options[ix].value=ocurren
	document.forma1.lista.options[ix].text=txt_ocurren
	document.forma1.lista.selectedIndex=ix+1
}

function SubirOcurrencia(id){
	ix=document.forma1.lista.selectedIndex
	if (ix==-1 || ix==0) return
	ocurren=document.forma1.lista.options[ix-1].value
	txt_ocurren=document.forma1.lista.options[ix-1].text
	document.forma1.lista.options[ix-1].value=document.forma1.lista.options[ix].value
	document.forma1.lista.options[ix-1].text=document.forma1.lista.options[ix].text
	document.forma1.lista.options[ix].value=ocurren
	document.forma1.lista.options[ix].text=txt_ocurren
	document.forma1.lista.selectedIndex=ix-1
}


function BajarSubc(Id){
	valores=Array()
	for (i=0;i<lista_sc.length;i++){
		valores[i]=returnObjById(lista_sc[i]).value
		if (lista_sc[i]==Id){
			xpos=i
		}
	}
	if (xpos==lista_sc.length-1) return
	areemplazar=returnObjById(lista_sc[xpos+1]).value
	valores[xpos+1]=valores[xpos]
	valores[xpos]=areemplazar
	areemplazar=lista_sc[xpos+1]
	lista_sc[xpos+1]=lista_sc[xpos]
	lista_sc[xpos]=areemplazar
	xsalida=""

	for (i=0;i<lista_sc.length;i++){
		subc=lista_sc[i].substr(1,1)
		if ((i==0 || i==1 ) & (subc==1 || subc==2) && is_marc=="S"){
			xsalida+=valores[i]
		}else{
			xsalida+="^"+subc+valores[i]
		}
	}
	Redraw(xsalida,"","")
}

function SubirSubc(Id){
	valores=Array()
	for (i=0;i<lista_sc.length;i++){
		ctrl= returnObjById(lista_sc[i])
		valores[i]=returnObjById(lista_sc[i]).value
		if (lista_sc[i]==Id){
			xpos=i
		}
	}
	if (xpos==0) return
 	xxss=lista_sc[xpos-1]
 	if (xxss.substr(1,1)==2 || xxss.substr(1,1)==1 ) return
	areemplazar=returnObjById(lista_sc[xpos-1]).value
	valores[xpos-1]=valores[xpos]
	valores[xpos]=areemplazar
	areemplazar=lista_sc[xpos-1]
	lista_sc[xpos-1]=lista_sc[xpos]
	lista_sc[xpos]=areemplazar
	xsalida=""
	for (i=0;i<lista_sc.length;i++){
		subc=lista_sc[i].substr(1,1)
		if ((i==0 || i==1 ) & (subc==1 || subc==2) && is_marc=="S"){
			xsalida+=valores[i]
		}else{
			xsalida+="^"+subc+valores[i]
		}
	}
	Redraw(xsalida,"","")
}

function AgregarSubcampo(subc,j){
	add_name=""
	ins=subc.id
//verify if the actual subfield is filled. If not, no subfield is added
	ins=ins.substr(1)
	ctrl= returnObjById(ins)
	if (Trim(ctrl.value)=="") {
		if (ins.substr(1,1)!="-"){   //if the subfield is optional can be empty
			subc.selectedIndex=0
  			ins=-1
  			return
  		}
	}
	salida=""
	ixsc=-1
    for (i=0;i<document.forma1.elements.length;i++){
      	tipo=document.forma1.elements[i].type
      	nombre=""
       	switch (tipo){
        	case "text":
        		ixsc++
        		nombre=document.forma1.elements[i].id
        		subc_act=nombre.substr(1,1)
        		valor=" "
        		valor=document.forma1.elements[i].value
        		if (ixsc>1){
        			salida+="^"+subc_act+valor
        		}else{
        			if ((ixsc==0 || ixsc==1) && (subc_act=="1" || subc_act=="2") && is_marc=="S"){
        				salida+=valor
                    }else(
                    	salida+="^"+subc_act+valor
                    )
        		}
            	break
	      	case "select-one":
	       		nombre=document.forma1.elements[i].id
	       		if (nombre=="" || nombre.substr(0,1)!="t") break
	       		subc_act=nombre.substr(1,1)
	       		ixsc++
	       		valor=document.forma1.elements[i].options[document.forma1.elements[i].selectedIndex].value
	       		if (ixsc<2 && (subc_act==1 || subc_act==2)){
	       			if (Trim(valor)=="") valor=" "
	       				salida+=valor
	       		}else{
	       			if (Trim(valor)!=""){
						if (valor.indexOf('^')==-1)
							salida+="^"+subc_act+valor
						else
							salida+=valor
					}
	       		}
     			break
        	}
       		if (nombre==ins){            // se determina si el nuevo subcampo se va a insertar aquí
       			new_subc=Trim(subc.options[subc.selectedIndex].value)
       			add_name=subc.options[subc.selectedIndex].text
       			salida+="^"+new_subc
       		}
       	}
       	Redraw(salida,new_subc,add_name)
        return
	}

function DeleteSubfield(subc){
	salida=""
	ixsc=-1

    for (i=0;i<document.forma1.elements.length;i++){
    	tipo=document.forma1.elements[i].type
   		nombre=""
       	switch (tipo){
        	case "text":
        		ixsc++
        		nombre=document.forma1.elements[i].id
        		subc_act=nombre.substr(1,1)
        		valor=" "
        		valor=document.forma1.elements[i].value
        		if (nombre!=subc){
	    			if (ixsc>1){
	    				salida+="^"+subc_act+valor
	    			}else{
	    				if ((ixsc==0 || ixsc==1) && (subc_act=="1" || subc_act=="2")){
	    					salida+=valor
	               		}else{
	               			salida+="^"+subc_act+valor
	               		}
	    			}
    			}
            	break
	      	case "select-one":
	      		case "select-one":
	       		nombre=document.forma1.elements[i].id
	       		if (nombre=="" || nombre.substr(0,1)!="t") break
	       		subc_act=nombre.substr(1,1)
	       		ixsc++
	       		valor=document.forma1.elements[i].options[document.forma1.elements[i].selectedIndex].value
	       		if (ixsc<2 && (subc_act==1 || subc_act==2)){
	       			if (Trim(valor)=="") valor=" "
	       				salida+=valor
	       		}else{
	       			if (Trim(valor)!=""){
						if (valor.indexOf('^')==-1)
							salida+="^"+subc_act+valor
						else
							salida+=valor
					}
	       		}
     			break
        }

    }
    Redraw(salida,"","")
    return
}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: campos.php
Type: application/octet-stream
Size: 12021 bytes
Desc: not available
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20210318/18e97bf8/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: index.php
Type: application/octet-stream
Size: 8328 bytes
Desc: not available
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20210318/18e97bf8/attachment-0001.obj>


More information about the isis-users mailing list