cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Manual Fill In Option For Combo Box

Hi Everyone,

 

I have some issue with the code to allow manual fill in for combo boxes in PowerApps. The combo box's data source is from a SharePoint List For my datacards, i've used this following code in the Update() section to allow manual fill ins:

If(

    !IsBlank(DataCardValue16.SelectedItems),

    DataCardValue16.SelectedItems,

    If(

        !IsBlank(DataCardValue16.SearchText),

        {

            Value: DataCardValue16.SearchText,

            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"

        },

        Blank()

    )

)

 

However, the code doesn't seem to work for combo boxes, help please! Thank you 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Manual Fill In Option For Combo Box

@ayyjam 
Do you mean: instead of a Choices type column you decided to store the ComboBox options in another SharePoint list?  If yes, I agree that's a great idea.  Especially when the ComboBox options frequently change. It does make the solution... different from the one I proposed though.

Put this code in Update Property of the Card.  It will fit your scenario much better.  

If(
    !IsBlank(ComboBox1.Selected),
    ComboBox1.Selected.your_column_name,
    ComboBox1.SearchText
)

 

Best of luck building your PowerApp.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

 

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

Re: Manual Fill In Option For Combo Box

@ayyjam 
I made a Tweet on this topic with some basic instructions but I can't seem to copy the images over to the forums.  Check out this link and read both messages 1 and 2.

 

Link To Tweet

https://twitter.com/mattbdevaney/status/1234457888774443012

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Frequent Visitor

Re: Manual Fill In Option For Combo Box

Hey Matthew! @mdevaney 

 

Checked out your tweet, thanks so much! I've just tried to enter the code but it showed the error. 'Expected Text Value' How do i fix that? Thanks again!

 

The ComboBox's Datasource is from another existing SharePoint List, not the parent and for that column setting, i chose it as 'Single Line of Text' instead of Choice. 

Highlighted
Super User III
Super User III

Re: Manual Fill In Option For Combo Box

@ayyjam 
Do you mean: instead of a Choices type column you decided to store the ComboBox options in another SharePoint list?  If yes, I agree that's a great idea.  Especially when the ComboBox options frequently change. It does make the solution... different from the one I proposed though.

Put this code in Update Property of the Card.  It will fit your scenario much better.  

If(
    !IsBlank(ComboBox1.Selected),
    ComboBox1.Selected.your_column_name,
    ComboBox1.SearchText
)

 

Best of luck building your PowerApp.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

 

View solution in original post

Highlighted
Microsoft
Microsoft

Re: Manual Fill In Option For Combo Box

As mdevaney  says, you should set the text data for the selected values.

Highlighted
Frequent Visitor

Re: Manual Fill In Option For Combo Box

Hi. @mdevaney 

 

Thanks so much for your response. I've tried to input that into the 'Update' section but errors such as unexpected characters and expected operator popped up. 

 

Edit: I managed to solve the issue with a few tweaks to your code. Thank you so much! 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,743)