cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to display combobox field value in Text label after submitting canvas app?

Dear all, 

 

I am trying to use text labels to display chosen values in the Canvas app Combobox after they have been saved to the SharePoint.

 

The combobox gets its values from the external SP list and uses Update ={Value:cmb_Name.Selected.Result} to submit its inputs to the SP list.

 

I have added a text label in another screen with Textcmb_Name.Selected.Result in order to display users what has been entered in another screen. However, after the forms are submitted the text label appears blank even though, there is a selected item in the Combobox. 

I have tried setting Text = Text(Datacard_Name.Default), but then receive an error that the text function has invalid arguments. Probably that is not a very logical solution after all.. Perhaps someone could advise if it possible to solve it and if yes how? 

 

2021-01-20_00-32-07.png

 

3 REPLIES 3
WarrenBelz
Super User
Super User

@Anonymous ,

On the OnChange of the Combo Box, set a Variable

Set(varDDValue,Self.Selected.Result)

and make the Text of the Label 

varDDValue

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

RandyHayes
Super User
Super User

@Anonymous 

I believe your problem is that your combobox in your form is not being set to the default items.

In order to resolve this, you will need to set the DefaultSelectedItems property of the combobox.  To do so, you need to match the record of the Items property.  

I am going to assume, since you mention Result in your formula, that you are using a Distinct function in your Items property.

If so, then set the DefaultSelectedItems property to :

{Result: Parent.Default}

I would then refer to the form updates property to get the value from the record in the label in the other screen:

Label Text property:

YourFormName.Updates.yourColumn.Value

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Anonymous
Not applicable

hi @RandyHayes , thank you.

Correct, I am using Distinct function in the Combobox's Items property. I did make the changes you suggested. It work when I am filling in the form, but when it is submitted, the text label shows [object Object] value, while the Combobox shows the selected item. Is this an expected result?

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,109)