I'm trying to concatenate the results of  two represents clauses for the 
same field: "relationshipTypeID"    The first "represents" clause returns 
"subjectAreaCode" and the second  returns "relationshipTypeCode".  Without 
all the queries, this could normally be accomplished by '%(field_1)s 
%(field_2)s' format, but one of my represents uses a full query.

I can't stack the "represents" clauses because the last one overwrites the 
first one.  How can I get both fields to display whenever the 
"relationshipTypeID" field is used? Here are the two "represents" clauses:

db.RelationshipRoleType.relationshipTypeID.represent = lambda id, r: db((db.
RelationshipType.id==id) & (db.RelationshipSubjectArea.id == db.
RelationshipType.relationshipSubjectAreaID) & 
(db.RelationshipSubjectArea.subjectAreaID 
== db.SubjectArea.id)).select().first().SubjectArea.subjectAreaCode

db.RelationshipRoleType.relationshipTypeID.represent = lambda id,row: db.
RelationshipType(id).relationshipTypeCode

Thanks,

Alex Glaros

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to