Jump to content

MatthewK

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MatthewK's Achievements

  1. Hello, I'm having a mysterious problem where my code to hide checkboxes, exes, and the bulk delete link is working in the DataPage Preview but not when deployed using .NET to SharePoint. The SharePoint page where this DataPage is being deployed has 3 other DataPages on it, however other rules and scripts are running without issue on the same SharePoint page. I've also tried deploying this DataPage to a blank SharePoint page template and still can't get it to work. For some reason, the script on this specific DataPage just isn't running. This is a 'Results' DataPage Here's the script in the footer of the DataPage. I've tried building my lockstatus variable two ways. First, I created a Calculated field that uses SQL to pull the LockStatus of a Program. In an attempt to troubleshoot, I secondarily tried to set my lockstatus variable off an external parameter called 'LockStatus'. Both methods work without issue when Previewing, but fail when deployed. Here's what I don't understand: if I deploy this DataPage as an iframe to SharePoint, THE SCRIPT WORKS! But, I have other challenges with the iframe that I can't get around, like it only displaying in mobile mode because I can't get results to wrap text... Please help! <script type="text/javascript"> document.addEventListener('DataPageReady', function(event) { if (event.detail.appKey == '[@cbAppKey]') { // var lockstatus = document.querySelector(".cbResultSetCalculatedField").innerHTML; var lockstatus = "[@LockStatus]"; console.log(lockstatus); if (lockstatus == "Locked") { var checkboxes = document.querySelectorAll("[action*='[@cbAppKey]'] input[type='checkbox']"); for (let cb of checkboxes) { cb.style.display = "none"; } var exes = document.querySelectorAll("[action*='[@cbAppKey]'] a[data-cb-name='InlineDelete']"); for (let x of exes) { x.style.display = "none"; } var bulkdelete = document.querySelectorAll("[action*='[@cbAppKey]'] a[data-cb-name='BulkDeleteButton']"); for (let bd of bulkdelete) { bd.style.display = "none"; } } } }); </script>
  2. Thank you for all your help, but ARGH! I feel so dumb. I have 3 groups in my table and this solution only worked for the 1st subtotal group. Groups 2 and 3 actually now have an undesirable result as some of the aggregates are now missing! I'm sorry if I'm wasting your time but I have no idea how to proceed...
  3. Absolutely! Aggregate 1 is very simple. It's just a sum of several fields Aggregate 2 is a bit trickier as I'm trying to get the % variance between This Year (TY) and Last Year (LY), 2 Years Ago (LLY), and Plan The formulas are working as expected, I just can't get your trick to apply to anything but the Report Totals. Thank you in advance!
  4. @CoopperBackpack thank you so much for your solution! I'm not the original poster but this helped me tremendously. Quick question: how do you get this to work for groupings in the table? The TOTAL row works great with var % showing up using your solution. But notice in the gray "group" rows underneath, the var % are not showing up (denoted by red x). Thank you in advance!
×
×
  • Create New...