PxDeininger Posted August 4, 2017 Report Share Posted August 4, 2017 I am trying to set up conditions for a change order form. I need to allow users to submit a form and have it marked as unapproved and in a "New Request" status. If the user is one of the project leads (2 leads assigned to each project), and they are submitting a change request for their own project, the request needs to be marked as approved and the status updated to "In Process". Below is the script that I currently have in my footer but the it's not working. Any suggestions? <SCRIPT> function Updatestatus() { if ("[@authfield:Employee_Profile_Full_Name]"==document.getElementByName("InsertRecordProject_Manager_Assignment")[0].value || "[@authfield:Employee_Profile_Full_Name]"==document.getElementByName("InsertRecordProject_Engineer_Assignment")[0].value) { document.getElementsByName("InsertRecordApproval_Status")[0].checked="true"; document.getElementsByName("InsertRecordEC_Status")[0].value="In Process"; document.getElementsByName("cbParamVirtual1")[0].value="Assign Editor and Reviewers"; document.getElementsByName("cbParamVirtual2")[0].value="Go to review window"; document.getElementsByName("cbParamVirtual6")[0].value="Update notification"; document.getElementsByName("cbParamVirtual7")[0].value="Set Reviewers"; } else if ("[@authfield:Employee_Profile_Full_Name]"!=document.getElementByName("InsertRecordProject_Manager_Assignment")[0].value || "[@authfield:Employee_Profile_Full_Name]"!=document.getElementByName("InsertRecordProject_Engineer_Assignment")[0].value) { document.getElementsByName("InsertRecordApproval_Status")[0].checked=="false"; document.getElementsByName("InsertRecordEC_Status")[0].value="New Request"; document.getElementsByName("cbParamVirtual1")[0].value="View Details"; document.getElementsByName("cbParamVirtual2")[0].value="View details page"; document.getElementsByName("cbParamVirtual6")[0].value="Request received"; document.getElementsByName("cbParamVirtual7")[0].value="Pending Changes Report"; } } document.getElementById("caspioform").onchange = Updatestatus; </SCRIPT> Quote Link to comment Share on other sites More sharing options...
jhernandez Posted August 15, 2017 Report Share Posted August 15, 2017 hm, is this not working when you try it within Caspio, or are you embedding the DataPage in website and it doesn't work then? Quote Link to comment Share on other sites More sharing options...
PxDeininger Posted August 15, 2017 Author Report Share Posted August 15, 2017 It's not working in Caspio or on the page that I am deploying the datapage to. I've double and triple checked each line to make sure I didn't enter anything incorrectly but can't seem to find the issue. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.