Jump to content

GlennFL

Members
  • Posts

    2
  • Joined

  • Last visited

GlennFL's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. The short answer is no, SELECT DISTINCT is not available for a view (or datapage), or GROUP BY aggregate functions. If you search deeper here you'll find some creative ways to get the job done. Somewhat clunky but I have used grouping on the datapage along with some css hacking to hide the child rows. Also clunky but effective could be adding a "placeholder" table (or view) that is distinct to base your report datapage on and then use a keyID field and calculated fields for the report row fields where you can define the SQL to create a distinct result. Feel free to add some votes to the ideabox submission for this. Can you provide an example of the data structure?
  2. This is on a report details page containing both UPDATE and DELETE buttons, I have been unsuccessful in capturing / processing a delete event using the the new AJAX processing. The functional intention is that I have a requirement to verify some data / field values before permitting a record delete. Before the AJAX release, I could capture Mod0DeleteRecord onclick event and then process using return false if validation failed. With AJAX on, I can still capture the button click and process a validation (actual code below), but the return false and event.preventDefault does stop the delete event from continuing. I suppose I could approach this by hiding the delete button altogether until such time that the proper criteria permits deletion but I would prefer to keep the UX as it was before the AJAX update. document.getElementsByName("Mod0DeleteRecord")[0].addEventListener('click', function(event) { event.preventDefault(); if (1==1) { alert("validation failed"); return false; } }); I've also tried using the BeforeFormSubmit event handler but was not able to capture the delete click vs the update click hence the delete validation script would validate for update submissions and vice-versa. I've spent an embarrassing amount of time time trying to figure this out, your help is much appreciated. Thank you
×
×
  • Create New...