cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mantastg08876
Responsive Resident
Responsive Resident

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

@mantastg08876 ,

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

@mantastg08876 

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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (54,627)