I'm not sure if this is even possible.
I am trying to create an editable gallery with a collection as its source. This gallery has save and edit button for each line item which trigger variables "showSaveButton" and "editButtonPressed". These variables control display modes of elements as a typical editable gallery does. The problem area is a single selection combo box in the gallery that has an Items field that points to a SharePoint List. I'm open to all suggestions as I'm almost out of ideas.
Problem 1: When I save a line item, a new line item is patched into the collection and works properly. However, the combo box in the previously saved line item does not show the selection saved. It is apparent why it doesn't show as the source of the gallery is the collection. The only work around I can see is using a label or text input that is visible when the "showSaveButton" variable is False. Seems like there should be a better solution that would only need to utilize the existing combo box. Thoughts?
Problem 2: When I click the edit button for a given line item in the gallery, the value in the combo box is blank. Again due to the gallery source the reason why is apparent. If I could save the entire selected database record in the collection when the save button is pressed and reference it as a default value when the edit button is pressed that could work. I'm just not sure how to do this. Or maybe another solution would be better.
Let me know if you have any questions and thanks for any and all help.