Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

display 2 gallery type in one text input field

(1) ShareShare
ReportReport
Posted on by 76
Hi @WarrenBelz @RandyHayes @Pstork1
 
I have 2 different gallery1 and Gallery 2, I have a single text input where I want to display, data selected in either of Gallery. I have written the default property as (Gallery1.selected.'Leave type' OR Gallery2.selected.'WFH Type') then this is showing error, how to achieve the requirement?
 
I want to display the below text in label - how to display the field value in label? (ex. I have the duration field that keeps the value in days)
 
2 days Annual Leave for Gaurav Kumar
Start: Thursday, 18-Jul-23 End: Friday, 19-Jul-23

 
  • Kuma0002 Profile Picture
    76 on at
    display 2 gallery type in one text input field
    @FLMike thanks for your message.
     
    Please see below screenshot. I have two different gallery1 is Leave type and Gallery2 is WFH type, all the leave type in gallery is in the form of Button.
    I want to display the button name (ex: Annual leave or Regular WFH is a button) but one at a time from both of the gallery in the text field called "You Selected" when user click on any gallery button.
     
    I am able to display the button name from one gallery only, not from both of the gallery using formula: default property: gallery1.selected.'Leave Type'.
    Also, I have tried to use formula: gallery1.selected.'Leave Type' OR gallery2.selected.'WFH Type' - it's not working.
     
     
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    41,306 Super User 2025 Season 1 on at
    display 2 gallery type in one text input field
    Hi
     
    1) you didn't share the error
    2) you don't specify how we decide for you which Gallery to get the data from since both galleries could have a record selected
    3) Your Fields, you have in your text about, do not match up with the text you say you want to show.
     
    However, to verify if the Leave Type is not blank, then use that value, of if its blank, then check if Gallery2 WFH Type is blank and if not use that
    and is both are blank it won't put anything in the Label.
    If(!IsBlank(Gallery1.Selected.'Leave Type'), Gallery1.Seleted.'Leave Type', If(!IsBlank(Gallery2.Selected.'WFH Type'), Gallery2.Selected.'WFH Type'));
     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard