Hi all,
Please read:
I have a set of Drop Downs where users select predetermined options in an Edit Form. I also have a function where, if the user has filled out the form before, they can enter their email and click a button and the data from their first entry (the first row of a SharePoint list with their email) is inputted into the relevant Drop Downs (and Text Inputs and Toggles). This is done through context variables: when the button is pressed the data fields from the relevant row are captured with the LookUp function and stored in context variables using UpdateContext. These context variables are also the defaults for the Drop Downs (and Text Inputs and Toggles), and the data appears in the drop downs as soon as the button is pressed (and the context variables are no longer null). The data sources for the Dropdowns are choice columns in the SharePoint list.
My problem is that upon form submission, even though the correct data (e.g. "Manager", which is a valid option in the Title drop down) is shown in the drop downs, the app acts like there is no data there. Drop Downs with Required values present error messages as if there is nothing in the boxes. When all Drop Downs are set to Not Required (inappropriate and just for testing), the form submits but the data shown in the boxes is not entered into the SharePoint list - the fields are null.
Important: This method with context variables as defaults works perfectly for Text Inputs and Toggles, just not Drop Downs. No errors are thrown and the data appears in the SharePoint list.
Not sure if relevant: The DataCardValue values are set to Value rather than @odata.type as a workaround to a previous problem where Drop Down options weren't displayed properly.
Sorry for the long post, thanks to anyone who read it.