Buy Now
Sign in

Group conditions and view table

emrahsevgi , February 09 2019, 17:34
E
emrahsevgi 34
February 09 2019, 17:34 #383770
Hi;
I have 3 table in read_data function. Model names are case, applicant and party. applicant and party models are relaeted to case. foreign key is case_id. Relation is "one matching record, foreign key in this table" Relation Condition is party.case_id:case.case_id
I can input much more party which are case_id is same with case.case_id.
I have a tableview which name is case_list. that view output is:
Sıra No CASE ID Applicant Party
  1      950678196      fghfghfgh   ytrtyrtytry            
  2      950678196     fghfghfgh     uyuıyuıuyı    
This table show as if 2 records. Because of inputed 2 party name. But 2nd party name is related 1st case_id and applicant. I want to show 2nd party nameunder first partyname with 1st party name. Like this:
Sıra No CASE ID Applicant Party
  1      950678196      fghfghfgh   ytrtyrtytry  
uyuıyuıuyı
I guess I have to use Group conditions in read_data function party model. But I don't now how? Can I groupped party names which they have same case_id s?
My tableview is:
provider= {var:read_data}
Columns list=
counter:Sıra No
case.case_id:CASE ID
applicantcode:Applicant
partycode:Party
Columns views=
counter:{fn:row_counter}
applicantcode:{var:case_list.row.applicant.applicantname}{var:case_list.row.applicant.applicantcompany}
partycode:{var:case_list.row.party.name}{var:case_list.row.party.company}
PS: {var:case_list.row.applicant.applicantcompany} show if it has been inputed
Thanks.
E
emrahsevgi 34
February 11 2019, 22:00 #383818
Any soloution or idea?
healyhatman 7
February 12 2019, 01:39 #383826
Still not entirely 100% on what you're after. But I think maybe in your "fields to retrieve" you can try
GROUP_CONCAT(DISTINCT partymodel.partycode SEPARATOR '<br>'):partymodel.partycodealias
along with all your other fields.
And make sure you're using the group by field as well, probably group by case ID
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store