Ganesh M
Ganesh M

Reputation: 27

Power Apps Combo box concatenate display fields

I have a requirement in Power Apps Combo box concatenate display fields

I have a SharePoint list [IT Service Request], that has a choice column as Issue with the below choices: .Outlook .Laptop .Network .Other enter image description here

Now On my Power Apps screen, there is an Edit form. In the form, there is a combo box control connected to the above SharePoint list choice column. Whenever the user selects an Other option, there will be a Text-input control visible enter image description here

When the user provides a text and clicks on the submit button. The combo box selected value and text input value should be saved in the SharePoint list choice column. So it should concatenate both control values. So on the Update property, I tried the code below:

   Concat(
   DataCardValue3.SelectedItems,
   Value & 
   If(
      Value = "Other" && Not(IsBlank(TextInput2.Text)),
      ": " & TextInput2.Text,
      ", "
   ),
   ", "
)

But I am facing an error as "Expected Record Value" as shown below

enter image description here

Can anyone please suggest how I can resolve this? Thanks in advance!

Upvotes: 0

Views: 1550

Answers (1)

Sam Nseir
Sam Nseir

Reputation: 12041

Assuming this is a single select column.

With({ v: DataCardValue3.Selected.Value)},
  { Value: v & If(v = "Other" && Not(IsBlank(TextInput2.Text)), ": " & TextInput2.Text, "") }
)

Let us know if this is a multi-select choice column

Upvotes: 1

Related Questions