cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Partisan
Post Partisan

Collect text data with a combobox in a form?

Hey

I have a sharepoint list as datasource

One column is set to text - one row.

 

I want to force my user to input the exact same data in my textfield by having a combobox in my form in powerapps.

 

But it complains about expecting a record value.

 

How can i use a combobox and keep my text column in my datasource?

7 REPLIES 7
Highlighted
Super User III
Super User III

Re: Collect text data with a combobox in a form?

@Oskarkuus 

Unlock the data card. Hide the text box in the card. Put a Dropdown control in the card. Make the Items property of the dropdown 

[“item1”,”item”,etc]

Change the Update property of the card to Dropdown1.Selected.Value

(A dropdown control is better than a combo box for your issue).

et voila 

Highlighted
Post Partisan
Post Partisan

Re: Collect text data with a combobox in a form?

I need to have multiselect options in my dropdown so i guess im forced to use a combobox.

 

but i cant make it work still.

 

i can save data now to my textfield.

but i cant get it back to let the user edit the options when editing the form.

Highlighted
Helper III
Helper III

Re: Collect text data with a combobox in a form?

I'm having a hard time parsing how you're trying to set this up. Are you wanting the combobox to pull all the records in that column in sharepoint (defined as a single line of text) and then populate those items as options in the combobox?

If so, I think you can easily do that with ShowColumns(). Use the following:

ShowColumns(SharePointListSource, "ColumnName")

This is, of course, assuming that you don't have repeat entries in that column you want to be consolidated into one choice. I'm assuming all choices in that column are distinct.

Highlighted
Post Partisan
Post Partisan

Re: Collect text data with a combobox in a form?

Yes i think we are talking about the same thing.

 

My column data looks like this in sharepoint:

datavalue1; datavalue2; datavalue3.

It is defined as a singel line of text.

 

In powerapps in my form when i Add new data i use a dropwdown to select one or multiple options: datavalue1, datavalue2.... etc.

 

Then when i want to Edit the form, i want to populate the dropdown again with the selected records from creating the row. But since the data is stored in singel line of text my dropdown is just empty.... the data is there but it is not populated in my Edit form.

 

Is showcolumn() the solution for this?

Where do i put the code (ShowColumns(SharePointListSource, "ColumnName"))?

 

I have many rows in my datasource but only 5 options in my combobox for entering data.

so the data is repeating in the coulmn...
Example:
datavalue1; datavalue2
datavalue2; datavalue5
datavalue3; datavalue1
and so on.....

Highlighted
Helper III
Helper III

Re: Collect text data with a combobox in a form?

Just so I have it straight in my head: a single record in your column is "datavalue1;datavalue2;" meaning you need PowerApps to evaluate the string of each record and produce each distinct "datavalue#" (with no duplicates) as its own option?

I'm thinking you may want to pull that column into a PowerApps collection and do the data manipulation there. Is there a reason the SharePoint list itself isn't using a choice column instead? Are new datavalues added regularly?

Highlighted
Helper III
Helper III

Re: Collect text data with a combobox in a form?

I think I'm making this harder than it needs to be. I'm guessing you have already populated your items in the ComboBox items field and don't necessarily need them to pull from anywhere. If you haven't then click on your ComboBox, set its Items property to 

 

["datavalue1", "datavalue2", "datavalue3", "datavalue4", "datavalue5"]



What you want is to save the data back in text format as a string to SharePoint. I think if you go to the datacard's Update property and enter 

Concat(YourComboBoxName.SelectedItems, Value, ";")

you'll get what you're looking for. If you want to add a space, remember to put it inside the quotes where the semicolon is.

Highlighted
Anonymous
Not applicable

Re: Collect text data with a combobox in a form?

Hi @Oskarkuus how are you progressing with this? Were the above replies helpful?

 

@Anonymous 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

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 (7,693)