cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
andyjones81
Regular Visitor

How do I set the value of a label from an input in a component?

So I've got 2 screens lets say:

 

Screen1 

 has a component called "AddressGroup" which is made up of some fields, one of which is called "AddressLine1"

 

Screen2

 has a label called "Line1" 

When a user clicks a button to navigate to Screen2 from Screen1, how do I set the value of the label "Line1" to show the value of the AddressGroup component field AddressLine1

I've tried Value(Screen1.AddressGroup.AddressLine1.Value) and various other ways but can't get the label to populate.

1 ACCEPTED SOLUTION

Accepted Solutions
JR-BejeweledOne
Super User
Super User

I think I found your answer.   According to this you cannot access them directly like you are trying to do.  

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/how-to-retrieve-value-of-a-text-field-which-...



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

4 REPLIES 4
JR-BejeweledOne
Super User
Super User

Depending on what type of field AddressLine1 is, you might need something like this:

AddressGroup.AddressLine1.Text or Text(AddressGroup.AddressLine1.Value)



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
andyjones81
Regular Visitor

Neither of these work, when I do AddressGroup. the intellisense doesn't bring up the field names, and typing them in doesn't work either. 

JR-BejeweledOne
Super User
Super User

I think I found your answer.   According to this you cannot access them directly like you are trying to do.  

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/how-to-retrieve-value-of-a-text-field-which-...



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
andyjones81
Regular Visitor

Ah! I searched this forum but didn't come across this. 

Thanks for the link, I'll take a look as it sounds like an output field is the way to go. 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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.

Users online (1,909)