0

I am using Power App form in the SharePoint list.
My comboxes suddenly stopped working correctly.
I used a code below for the Update field in the Power App form for my custom combo boxes

enter image description here

It used to work as follow:

  • if value from a combo box list is selected insert selected value into SharePoint list
  • if a value from a list is not selected insert manually typed in value

So if value does not exist in the Combo Box value list user still can add custom value

Currently if I type "Test" - in order to filter values in the Combo box list

enter image description here

and select "Test 1"
enter image description here
It should insert "Test 1" into SharePoint list, but it inserts "Test"

What do I need to change to make it work again?

1 Answer 1

0

The behaviour that you are currently experiencing is exactly what I'd be expecting.

Your formula says, If there is text in the search box, use that value. If not, use the selected value.

As you're searching for "Test" you have something in your search box, so it will obviously use that value.

While I haven't tested it, I would write the formula to be something like this:

If(
    IsBlank(ComboBox4_1.Selected),
    ComboBox4_1.SearchText,
    ComboBox4_1.Selected.Result
)

My formula is saying, If you don't have a value selected, use the search text. Otherwise, use the selected value.

This formula probably wouldn't work if you want to allow multiple values, but I'm sure it could be tweaked for that scenario.

1
  • This works but now I cannot insert new values (values that do not exist on the list). If I just type a new value and click save the SharePoint will be blank.
    – Guest
    Dec 29, 2021 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.