Jump to content

ECDatabase

Members
  • Posts

    5
  • Joined

  • Last visited

ECDatabase's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi all, I am trying to change the color of rows in a tabular report based on expiration dates (calculated fields) and based on how many days until the document expires (90, 60, 30, 14). Here is the code I created by reading the Caspio article on how to change row colors: [@field:RegistrationDateTime] <a id="visi=[@field:Individual_NPI#]"> <script> var isi=document.getElementbyID("visi[@field:Individual_NPI#]"); if("[@calcfield:1#]<=14){isi.parentNode.parentNode.style.backgroundColor="#FF0000"} else if ("[@calcfield:1#]<='30'){isi.parentNode.parentNode.style.backgroundColor="#FF5500"} else if ("[@calcfield:1#]<='60'){isi.parentNode.parentNode.style.backgroundColor="#FFF300"} else if("[@calcfield:1#]<='90'){isi.parentNode.parentNode.style.backgroundColor="#23FF00"} else if("[@calcfield:7#]<='14'){isi.parentNode.parentNode.style.backgroundColor="#FF0000"} else if ("[@calcfield:7#]<='30'){isi.parentNode.parentNode.style.backgroundColor="#FF5500"} else if ("[@calcfield:7#]<='60'){isi.parentNode.parentNode.style.backgroundColor="#FFF300"} else ("[@calcfield:7#]<='90'){isi.parentNode.parentNode.style.backgroundColor="#23FF00"} </script> It's not working and I'm not sure why. Any help will be appreciated, I am a total JavaScript amatuer.
  2. Thanks Mathilda! So what if we set up a report and manually ran it every day. If the report showed the expiring certificates, could we have a submit button that could send out an email for each individual user? Ultimately what I need to start would be the code to show on the report how far out the expirables are and possibly highlight them based on the days out (90, 60, 30, 15). Is that possible with JavaScript? Thank you for letting me pick your brain!!
  3. Hi all! I am trying to find a solution: I would like to be able to send alerts, via email, to a user to alert them their certificate is expiring. Ideally I would like to send this 90, 60, 30 and 15 days in advance of the expiration date. I'm not even sure what sort of DataPage I would need to set this up? I'm sorry this is so generic, but I didn't want to get too far into the design of the app prior to knowing how difficult this would be to achieve. Any help would be greatly appreciated!!
  4. Hi Aurora! First of all, your name is AMAZING. Second, I was trying to use your solution for this post, but it is throwing an error message (" Values in one or more fields are invalid."). Here is what I am trying to do: I need to create a login redirect based on the criteria I am trying to submit on a DataPage. So, first, the user will create a login, then if they complete the next DataPage (a submission DataPage with the information going to another table) I want it to update the user table showing the DataPage has been completed. My thought was having the user check a box on the page saying they confirm the info they entered is correct. I want that confirmed box (yes) to be saved to the user table so that I can create the login redirect. If that box is checked, when they re-log in they will be sent to the next DataPage in the series, otherwise they will be sent to the DataPage with the box. I hope that makes sense. I know in your description you said it was from a report, maybe that is why I am getting the error? Here is what the code for the link looks like: <a class='cbMenuItem' href='#' onclick='window.open("https://c2ebl150.caspio.com/dp.asp?AppKey=4b38400036aef0ff9e464450b52c&parameter=[@Initial_Registration_Confirmed] ","mywindow", "menubar=1,resizable=1,width=500,height=500")'>Confirm</a> Thank you in advance for any help you can provide!! Casey
  5. I am trying to format multiple fields on a page. The first is the phone number, which I found the JavaScript for on the JavaScript forum. My issue is that I need to format phone number, social, and a tax-ID on one page and I am unsure how to accomplish this task. For phone number I am using the script below, plus I found another for formatting a social on StackExchange, but my JavaScript reading/writing skills are sub-par and I did not combine these correctly. Then I want to add in the option to format the tax ID as well, which is ##-####### (2 digits, dash, 7 digits). <SCRIPT LANGUAGE="JavaScript">function f_a(v_id){return document.getElementById(v_id);}f_a('EditRecordPhone_Number').maxLength = 14;f_a('EditRecordPhone_Number').onkeyup = function(v_e){v_e = v_e || window.event;if (v_e.keyCode >= 65 && v_e.keyCode <= 90){this.value = this.value.substr(0, this.value.length - 1);return false;}else if (v_e.keyCode >= 37 && v_e.keyCode <= 40){return true;}var v_value =(this.value.replace(/[^\d]/g, ''));if (v_value.length==7) {this.value = (v_value.substring(0,3) + "-" + v_value.substring(3,7));}else if(v_value.length==10){this.value = ("(" + v_value.substring(0,3) + ") " + v_value.substring(3,6) + "-" + v_value.substring(6,10));};}function(){document.getElementById("SSN").onkeyup = function() {var val = this.value.replace(/\D/g, '');var newVal = '';if(val.length > 4) {this.value = val;}if((val.length > 3) && (val.length < 6)) {newVal += val.substr(0, 3) + '-';val = val.substr(3);}if (val.length > 5) {newVal += val.substr(0, 3) + '-';newVal += val.substr(3, 2) + '-';val = val.substr(5);}newVal += val;this.value = newVal;};</SCRIPT>
×
×
  • Create New...