cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Expected record value in a DataCard

Hello,

 

I am new in Power Apps and I started with some basic staff: I have a SharePoint List and I would like to add items in this list using a Power Apps app.

 

So I created the application from the SharePoint list. I've got the Edit Form in one screen with all SharePoints column encapsulated in Data Cards. Till now everything ok and easy.

I have one calculated column in SharePoint which concatenates 3 columns: Column4 = Concatenate (Column1, "_", Column2, "_", Column3). 

Column 1, 2 and 3 are type "choice" with single choice and the same choices for each of them (Choice1,Choice2,Choice3) .

So the items from column4 are looking like: Choice1_Choice2_Choice3 or Choice1_Choice1_Choice1 depending what is chosen in Column 2 and 3.

By default, Power apps created for each of the 3 column (1,2 and 3) a data card with  dropdown (single choice). I would like to add in Power apps just one data card (corresponding to column 1) with a dropbox and to have directly from Column 1 the concatenation Choice1_Choice2_Choise3 when I add anew item in the list.

What I did was to change the "SelectMultiple" property of the column 1 dropdown and I tried to put in the "Update" property of the DataCard: concat(Column1_DatacardValue.selectedItems, value, "_") but it keeps telling me that Update property requests "record" type and not text. How should I write the formula in Data Card Update property in order to be seen as a record?

 

Thanks

Mircea

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Expected record value in a DataCard

Hi @Mircea ,

Do you mean that:
1)you want the column to be choice type ?

2)display it in the format of "Choice1_Choice2_Choice3"?

3)update it in combo box?

Please notice that:

If the column is choice type, it can not display as this format  "Choice1_Choice2_Choice3" in sharepoint.

But yes, you could make it display in this format in powerapps.

The combo box could only display the item in its Items property. So displaying  "Choice1_Choice2_Choice3"  is also not supported.

 

I suggest you use combo box to update, use label to display.

 

Try this:

1)set the column as multiple choice data type, value : Choice1,Choice2,Choice3

2)insert a combo box in that datacard to update data

set the combo box's Items:

Choices(listname.fieldname)

set the combo box's DefaultSelectedItems:

ThisItem.fieldname

set the datacard's Update:

combo box name.SelectedItems

3)insert a label inside the datacard to display data

set the label's Text:

Concat(ThisItem.fieldname,Value&"_")

 

Then you use that combo box to update data, label to display the data format that you want.

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: Expected record value in a DataCard

@Mircea 
The approach you could use here to remove the error is to change it from a Choices data type to text in SharePoint.  Refresh the datasource in your PowerApp after making any changes.

 

Then you would put this code in the Items property of the ComboBox

 

["Choice1", "Choice2", "Choice3"]

 

And the Default property of the ComboBox would have to be split into a table

 

Split(YourColumnName, "_")

 

Make the DisplayFields and SearchFields properties of your ComboBox this

 

["Result"]

 

 

Finally, the Update property should be set to

Concat(Column1_DatacardValue.SelectedItems, Result & "_")

 

 

---
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
Helper II
Helper II

Re: Expected record value in a DataCard

 @mdevaney 

I was thinking to this solution, but, I would like to leave the opportunity to add an item also directly in SharePoint. So I need to keep it for this case....

 

Thanks,

Mircea

Highlighted
Community Support
Community Support

Re: Expected record value in a DataCard

Hi @Mircea ,

Do you mean that:
1)you want the column to be choice type ?

2)display it in the format of "Choice1_Choice2_Choice3"?

3)update it in combo box?

Please notice that:

If the column is choice type, it can not display as this format  "Choice1_Choice2_Choice3" in sharepoint.

But yes, you could make it display in this format in powerapps.

The combo box could only display the item in its Items property. So displaying  "Choice1_Choice2_Choice3"  is also not supported.

 

I suggest you use combo box to update, use label to display.

 

Try this:

1)set the column as multiple choice data type, value : Choice1,Choice2,Choice3

2)insert a combo box in that datacard to update data

set the combo box's Items:

Choices(listname.fieldname)

set the combo box's DefaultSelectedItems:

ThisItem.fieldname

set the datacard's Update:

combo box name.SelectedItems

3)insert a label inside the datacard to display data

set the label's Text:

Concat(ThisItem.fieldname,Value&"_")

 

Then you use that combo box to update data, label to display the data format that you want.

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

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 (4,940)