Jump to content

rhinger

Members
  • Posts

    2
  • Joined

  • Last visited

rhinger's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi @CoopperBackpack, Thanks for your response, I appreciate you taking your time to give me such a detailed response and references. I did go ahead and deploy the code and get it to work as intended. I had to alter it slightly due to me using a view, but that was no issue. Thanks again.
  2. Hello All, I am trying to create an account creation datapage that has a built in checker to make sure the last four digits of the social security number entered matches the last four in our system. To do this, I have already created a calculated field, which gives me a YES or NO depending on if the last four digits entered on the social security match what we have on file. Here is that code: CASE WHEN (SELECT COUNT(*) FROM CollectionCRM WHERE Filenumber=[@field:CustomerTable_FileNumber] AND LastFour=[@field:CustomerTable_LastFour]) > 0 THEN 'YES' ELSE 'NO' END I am a little stuck now. What I am trying to do is when the calculated field says YES the account is created, if it says NO, an alert is presented that says "You are not authorized to create this account." Here is what I have tried: <script> document.querySelector('#caspioform').onsubmit = function(e) { e.preventDefault(); var input1= document.getElementById("LastFourCheck").value; if (input1 =="NO"){ alert('You are not authorized to create this account.'); } else { this.submit(); } } </script> Could somebody take a look and let me know what I am doing wrong? I hope you guys can help me out, thanks so much!
×
×
  • Create New...