"""Return list of field values for field tag inside record RECID."""
out=[]
iftag=="001___":
out.append(str(recID))
else:
digit=tag[0:2]
bx="bib%sx"%digit
bibx="bibrec_bib%sx"%digit
query="SELECT bx.value FROM %s AS bx, %s AS bibx WHERE bibx.id_bibrec='%s' AND bx.id=bibx.id_bibxxx AND bx.tag LIKE '%s'""ORDER BY bibx.field_number, bx.tag ASC"%(bx,bibx,recID,tag)
res=run_sql(query)
forrowinres:
out.append(row[0])
returnout
defcalculate_citation_history_coordinates(recid):
"""Return a list of citation graph coordinates for RECID, sorted by year."""