Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Showing text for two gallery.

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

I have a same text for two gallery (upcoming and pass).

Upcoming tab: there is no appointment it will showing text "No upcoming reservations". That's OK.

kinghnvn_0-1638259499457.png

 

 

Previous tab: there are 3 appointments but it's still showing text "No upcoming reservations"

How can I fix it?

kinghnvn_1-1638258913520.png

 

Thanks.

 

Categories:
  • kinghnvn Profile Picture
    on at
    Re: Showing text for two gallery.

    it's working now. thank you so much.

  • Verified answer
    PTBBSolutions Profile Picture
    691 on at
    Re: Showing text for two gallery.

    Hi @kinghnvn ,

     

    I've made a mistake.

     

    Please try below code:

     

    If(
    	upSelected,
    		CountRows(gallUpcoming.AllItems) < 1,
    	If(
    		prevSelected,
    			CountRows(gallPast.AllItems) < 1,
    				false
    		)
    	)

     

    Please accept this as a solution if it works as you expect.

  • kinghnvn Profile Picture
    on at
    Re: Showing text for two gallery.

    but it's wrong if I booked an appointment.

    kinghnvn_0-1638282583787.png

     

  • kinghnvn Profile Picture
    on at
    Re: Showing text for two gallery.

    @PT 

     

    I tried the code for the Visible property. 

    The text could not display at UPCOMING but it's still showing at the PREVIOUS screen

    kinghnvn_0-1638282106587.png

     

    just edit code as below. it works fine. thanks.

     

    If(
    upSelected,
    CountRows(gallPast.AllItems) >=1,
    If(
    prevSelected,
    CountRows(gallUpcoming.AllItems) >=1,
    false
    )
    )

     

  • PTBBSolutions Profile Picture
    691 on at
    Re: Showing text for two gallery.

    Hi @kinghnvn ,

     

    Can you try something like this:

    If(
    	upSelected,
    		CountRows(gallUpcoming.AllItems) >=1,
    	If(
    		prevSelected,
    			CountRows(gallPast.AllItems) >=1,
    				false
    		)
    	)

    for the Visible property. 

  • kinghnvn Profile Picture
    on at
    Re: Showing text for two gallery.

    @PTBBSolutions 

     

    Please find below code.

     

    UPCOMING button text: "UPCOMING (" & CountRows(gallUpcoming.AllItems) & ")"

    kinghnvn_1-1638265682537.png

    Upcoming button OnSelect: UpdateContext({upSelected:!upSelected});UpdateContext({prevSelected:!prevSelected})

    kinghnvn_2-1638265731551.png

    Previous buttons text: "PREVIOUS (" & CountRows(gallPast.AllItems) &")"

    kinghnvn_3-1638265753484.png

    Previous buttons OnSelect: UpdateContext({prevSelected:!prevSelected});UpdateContext({upSelected:!upSelected});

    kinghnvn_4-1638265774360.png

     

    MyAppts screen Text Visible

    If(CountRows(gallUpcoming.AllItems) >=1, false, true)

    kinghnvn_0-1638265635030.png

     

  • PTBBSolutions Profile Picture
    691 on at
    Re: Showing text for two gallery.

    Hi @kinghnvn ,

     

    What does the Upcoming and Previous buttons do?

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,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard