NikkiC Posted March 14, 2018 Report Share Posted March 14, 2018 Hi there, I have records called Cards, which span 5 different stages. If the first part of the Card is completed, the user is in stage 1. If the first and second part is completed, they are in stage 2 etc etc. I'd like to automate this (currently they can choose their own stage via a dropdown), and have written the following script, but it's not working. <script> var count_Brief= ("[@field:Brief]").length; var count_AnalystNotes = ("[@field:Analyst_Notes]").length; var count_RecTest = ("[@field:Recommended_test]").length; var count_Result= ("[@field:Actual_result]").length; if (count_Brief > 1) { document.getElementById("EditRecordStage").innerHTML = "2. Brief"; } else if (count_Brief > 1 && count_AnalystNotes > 1) { document.getElementById("EditRecordStage").value = "3. Analysis"; } else if (count_Brief > 1 && count_AnalystNotes > 1 && count_RecTest > 1) { document.getElementById("EditRecordStage").value = "4. Test"; } else if (count_Brief > 1 && count_AnalystNotes > 1 && count_RecTest > 1 && count_Result > 1) { document.getElementById("EditRecordStage").value = "5. Result"; } else { document.getElementById("EditRecordStage").value = "1. Question"; } </script> Does anyone have any insight here? Many thanks Nikki 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.