ahmed elbarbary

ahmed elbarbary

  • NA
  • 1.6k
  • 281.6k

How to display column offline URL with no data inside where

Jun 16 2020 2:04 PM

I work on angular 7 app I need to display column offilneURL with no data where column name equal offilne URL in report control table .

this mean only column Name offilneURL will display but empty data on it .

Logic I need to do is

if (this.reportcontrol.columnType=1) {

if(this.contentBody.contain(this.reportcontrol.fieldName))

{

no data will display inside offilneURL column on contentBody array of object . }

}
  1. ReportControl:any[];  
  2. reportid:string;  
  3. reportid=2028;  
  4. this._displayreport.GetReportControl(reportid).subscribe((res: any[]) => {  
  5.             this.ReportControl = res;  
  6.   
  7.   
  8.           });  
  9. report control is [{"reportId":2028,"fieldName":"offilneURL","columnType":1}]  
content body represent all data details for report as below :
  1. contentBody:any[];  
  2.  this._displayreport.GetReportDetails(reportid).subscribe((data: any[]) => {  
  3.   
  4.  this.contentBody = data;  
content body :
  1. [{"revisionID":"272299243","companyName":"Innovasic,Inc.","offilneURL":"https://source.z2d  
  2.   
  3. ata.com/2019/1/13/8/55/47/351/662203977/21527_SPCN.PDF"  
  4.    },  
  5.    {"revisionID":"272299243","companyName":"Innovasic,   
  6.   
  7. Inc.","offilneURL":"https://source.z2data.com/2019/1/13/8/55/47/351/662203977/21527_SPCN.  
  8.   
  9. PDF"  
  10. }]  

I prepare stackblitz for sample above I work on it

https://stackblitz.com/edit/create-ijwgfx?file=app%2Fapp.component.ts
 

Expected Result of content Body array of object as Below :

Empty column offilneURL