Hi all
I'll start with intended outcome. When completing a form that I can choose a person/people from a combobox (which is a lookup column which allows multiple values) or if that person is not in the lookup column, that I can add them to it. So what I have so far is a datacard where I can toggle between a textinput or a combobox being Visible. I have the Default values working. Below is the default for PeopleColumn_DataCard1
ThisItem.PeopleColumn
And below is the default for the Textinput that I have placed inside the datacard.
Concat(ThisItem.PeopleColumn, Value & ", ")
So the part that does not work is submitting the text input.
If(DataCardValue25.Visible, DataCardValue25.SelectedItems,TextInput1.Text)
Any help would be appreciated
Hi, thank you for your guidance, so I have taken your advice and have a TextInput to Patch directly to the SP list that holds all the records of people, this is a good enough work around for me.
Hi @Corissandageri,
Based on the issue that you mentioned, do you want to submit the Text input person name to LookUp column if the person name is not in the LookUp column?
Could you please tell me that how you configure the Text input, is there a column corresponding to it existing in the SP list?
I think there may be something missed in your scenario, if you want to pick 2 persons, one exists in the LookUp column dropdown list, the other one does not exist and you need to input this in the Text Input control to add this name to your LookUp column,right?
Based on the formula you provided, the Text input will be added to LookUp column directly if the TextInput is visible. If this is what you want, I am afraid that there is no direct way to achieve this in PowerApps currently.
As an alternative solution, I think you could save the Text input string to the original SP list where the LookUp column retrieves values.
To sum up, do not put If statement into the Visible property of the Combo Box or Text Input, just leave the TextInput alone to input and save, and you could select what you want from the Combo Box after this.
Set the OnChange property of the Text Input as below:
Patch(SPList2,Defaults(SPList2),{People:TextInput3.Text})
Note that in my scenario, SPList1 is the data source of the Edit form and owns the LookUp column. SPList2 is the list where the SPList1 LookUp column retrieves names from.
After this, you could select any name you want from the Combo Box.
Regards,
Qi
WarrenBelz
146,552
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,928
Most Valuable Professional