Ok, I’m hoping someone can help me here or offer some insight, or creative idea on what to do. Everyone knows not to get involved in a land war in Asia, but only slightly less well known is this – never go in against a browser form, when your job is on the line!! *sigh* it’s not that serious and I hope everyone will forgive me my pun/Princess Bride reference. Anyhow... to my problem. I have an infopath form with a dropdown box that queries against data in a database server on-prem and auto-populates several fields for the end user once they’ve made their choice. The attorney fields shown in the attached pictures with a list of all of the attorneys. When a user selects a matter, the form is supposed to:
- Grab the database attorney and store (in a hidden field)
- Set the Primary | Secondary | etc. attorney based on what was grabbed from the database
- Set Primary | Secondary | etc. secretary info based on what attorney is in each of those positions
In the filler, this behavior works perfectly. Dropdown values are set, I can use the dropdown to override info both prior to and after selecting a matter without issue. However, in the browser, something different happens.
As stated, The green highlighted field (Pic1) is supposed to change everything based on the info selected – it selects against a database, and pulls down info, etc. It should grab the attorney and then based on the attorney, fill in the secretary info. Something strange happens though if I do not hit the dropdown for *each* dropdown box PRIOR to selecting a matter in the green highlighted box.
In Pic2, I have only hit the dropdown for primary, which pulls up the list of attorneys and allows the inputter to override what would be pulled down from the database
Pic3 I’ve chosen my matter, and the data has cascaded down to the fields. However, note the secondary and tertiary attorney fields are !blank!, though the secondary and tertiary secretary info is filled in (which could only happen if those secondary/tertiary fields changed data). Worse, if I try and hit the dropdown on the secondary or tertiary to at least fill in what data should be there, Pic4 illustrates that there is no more data there to work with or select from!
Weird addendum. This is really baffling to me, but maybe someone can explain it. I’ve tried this in both internet explorer, chrome and edge all with the same results. I have a submit button that performs custom error checking. I try and minimize clicks for the end-user experience, so I like to auto close the form after submission, provided all supplied info is correct. If it isn't, an error message will display, and they can try again. As you can see in Pic1, Primary is required, so if I select matter first prior to hitting the dropdown, and get the blank results for all of my attorneys, like I do the secondary/tertiary in Pic3 below the form should not submit. This is because seemingly there is no info in the required primary field, but the form does successfully submit. And if I open the submitted item, lo and behold, the values that should be there for everyone based on the selected matter, are indeed there - though they didn’t display on the screen prior to submitting. If I omit another of my required fields (the doc link) so I deliberately trip the error prior to submitting, it causes everything to display correctly and the dropdown works as it should the whole time… (pics 5, 6 and 7). What am I doing incorrectly here? Short of the button press, is there another way programmatically to force a refresh so it doesn’t appear incorrect to the end user?
Edit: I rar'ed the word doc with the pics/explanations in it as doc|docx are not allowed extensions. Thank you in advance for any help|insight you may be able to provide, and for your time/consideration.