Only display 'Edit' link on certain rows on apex report

后端 未结 2 968
攒了一身酷
攒了一身酷 2021-01-23 09:52

I have the following report structure which shows sales targets and sales for products throughout the year.
Each product will have two rows: a row showing sales and a row sh

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-23 10:24

    Setting the condition on a column will cause the column to be either displayed or not for the whole column, not for a specific row.

    One possible solution might be to remove the extra column link through javascript. Run this code in a dynamic action, after refresh of the report. Execute javascript, execute on page load checked. I gave my report region a static id, which is "rStatic" in the code.

    $("#report_rStatic .report-standard td[headers='TYPE']").each(function(){
      if($(this).text()=='SALES'){
        $(this).closest('tr').find("td[headers='EDIT_RECORD'] a").remove();
      };
    });
    

    This will loop over all cells in the TYPE column, and when the type is SALES it will remove the anchor tag in the EDIT_RECORD column.

提交回复
热议问题