'Represent for the Request Reference
if show_link is True then it will generate a link to the record
if pdf is True then it will generate a link to the PDF'

@staticmethod
def req_ref_represent(value, show_link=True, pdf=False):

    if value:
        if show_link:
            db = current.db
            table = db.req_req
            req_row = db((table.req_ref == value)).select(table.id, limitby=(0, 1)).first()
            if req_row:
                if pdf:
                    args = [req_row.id, 'form']
                else:
                    args = [req_row.id]
                return A(value, _href=URL(c='req', f='req', args=args))
        return B(value)
    return current.messages['NONE']
