Thursday, December 29, 2016

Displaying of a select list and a button based on conditions in one Tabular Form Column


Requirement:
For already existing records in data base a select list must display, and for newly added records a button must display for deleting the newly added record
Resolution Steps:
Create a dynamic action on clicking of add_row button as
var $tr = $("TABLE[summary='Form on Vehicle Parts']>tbody tr:last");
if (parseInt($("#P5_VEHICLE_TYPE").val(), 10) == 0) {
    alert("Please select any one of the Vehicle Type from the list.");
    $("#P5_VEHICLE_TYPE").focus();
}
else {
    apex.widget.tabular.addRow(); // Adds NewRow

    $tr = $("TABLE[summary='Form on Vehicle Parts']>tbody tr:last");
    $("td[headers='ACTIVE_STATUS'] SELECT", $tr).css({display: "none"});
    $("td[headers='ACTIVE_STATUS']", $tr).append('<button class="uButton" onclick="$(this).closest(\'tr\').remove();" type="button"><span>Delete</span></button>');
}

It includes region name in summary


By
A.Arun Kumar

2 comments:

  1. Excellent blog I visit this blog it's really awesome. The important thing is that in this blog content written clearly and understandable. The content of information is very informative.
    Oracle Fusion HCM Online Training
    Oracle Fusion SCM Online Training
    Oracle Fusion Financials Online Training
    Big Data and Hadoop Training In Hyderabad

    ReplyDelete
  2. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.

    Spark and Scala Online Training

    ReplyDelete