cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mircea
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

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
mdevaney
Super User
Super User

@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."

 @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

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,892)