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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,192)