I am stuck on a script and am hoping someone can help. Strangely, my code is not working on a new form that I'm creating but has been working on a previous form. It should be a simple copy and paste but for whatever reason, it has been unsuccessful. Here's the setup:
Field 1 is populated by a lookup table. That is coming through successfully. I have a javascript that strips the domain name from Field 1 and populates Field 2. That is also working successfully. I have a lookup rule configured to query a SQL table using Field 2 and return a value to Field 3. That piece is not working. I have my code embedded in Document Ready. If I manually change the value in Field 2, the lookup runs which confirms the data exist and connection is successful.
$(document).ready(function() {
$('#Field2').val(document.getElementById('Field1').value.replace('DOMAINNAME\\',''));
$('#Field2').trigger('change');
})