web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Populate two labels wi...
Power Apps
Answered

Populate two labels with different text

(0) ShareShare
ReportReport
Posted on by 139

Good morning, I am not finding the solution myself; may be better served turning to you guys! 

 

I have an app with two screens. MainScreen is essentially a map image with transparent buttons laying over top the mall logos and when clicked, it populates labelText via UpdateContext. This will be used to display the Mall property's address and phone number:

 

Screen1.jpg

 

You will see there is a blue "View Property Team" button which navigates to my second screen. On the second screen, I would like to display the team members who reside at that particular mall property. It should be displaying based on which Mall logo the user clicked from the MainScreen:

 

Screen2.jpg

 

Finally, by clicking the blue "Go Back" button, that should reset the label text on the second screen. How can we approach this? 

 

As always, thank you in advance,

Morghan

Categories:
I have the same question (0)
  • Verified answer
    AW Profile Picture
    127 on at

    This could be done in different ways depending on how you're adding/pulling the team members. If you have a data source like Sharepoint, Excel, etc., you could pull those in with a gallery filtered by the item you click. Otherwise, I assume you're just adding the text as you do the address. In either case, you could use a global variable for each item. 

     

    For example:

    For MallLogo1, in the OnSelect property, enter
    Set(MallMembers, "Member Names List1"); Set(MallAddress, "Address1")

    ForMallLogo2, in the OnSelect property, enter
    Set(MallMembers, "Member Names List2"); Set(MailAddress, "Address2")

    Repeat for all other buttons

     

    Set the LabelText to MallAddress (no quotes)

     

    On the MemberScreen, add a text label and overwrite "Text" with MallMembers (no quotes)

    For the GoBack button, add Set(MallMembers, "") - though technically that wouldn't be necessary since you don't see them on the first screen and each button would reset the data anyway.

     

    Using text only, you may have problems with your formatting. You could potentially use a collection to help modify the formatting. Otherwise, if you use a data source, it would be easier to modify the members ongoing and you could format the gallery more easily.

  • mdcastorena Profile Picture
    139 on at

    Thank you so much @AW  - this is exactly what I need for now. Tested successfully. Down the road, I am sure the text will be too much to manage and I will eventually move to storing this in a data source. This will work great for now. 

     

    Thanks again,

    Morghan

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 474

#1
Valantis Profile Picture

Valantis 474

#3
WarrenBelz Profile Picture

WarrenBelz 375 Most Valuable Professional

Last 30 days Overall leaderboard