I have a choice field that is a list of authors (people's names) and allows for multiple selections. When wanting to create an App for this SharePoint list, PowerApps automatically converted the field to a combobox and the checkboxes moved into a drop down menu.
Now if users don't see an author or co-author on the list provided, I've followed this great article on how to add in an 'other' option. https://matthewdevaney.com/create-a-dropdown-with-an-other-option-in-power-apps/
However, I want the user to be able to keep those names selected and add the additional author they enter to the list and push that all back to the SharePoint list. I've been working with the following code, but keep getting errors.
This code is in the update section of the field NWRC Author(s)_DataCard1_1. I'm getting 9 errors all in this section - four expected operator errors, 3 unexpected character errors, 1 incompatible type, and an error with the function 'if' statement.
If(
"Add Author" in DataCardValue4_1.SelectedItems,
Ungroup(
Table(
{DropdownOptions: DataCardValue4_1.SelectedItems},
{DropdownOptions: [TextInput2.Text]}
),
"DropdownOptions"
)
DataCardValue4_1.SelectedItems
)