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

Community site session details

Session Id : jrllQ6m1rZMc4GjfV+Ix7s
Power Apps - Building Power Apps
Answered

Showing text for two gallery.

Like (0) ShareShare
ReportReport
Posted on 30 Nov 2021 08:03:50 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 01 Dec 2021 at 01:22:44
    Re: Showing text for two gallery.

    it's working now. thank you so much.

  • Verified answer
    PTBBSolutions Profile Picture
    691 on 30 Nov 2021 at 16:19:26
    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 30 Nov 2021 at 14:31:01
    Re: Showing text for two gallery.

    but it's wrong if I booked an appointment.

    kinghnvn_0-1638282583787.png

     

  • kinghnvn Profile Picture
    on 30 Nov 2021 at 14:23:10
    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 30 Nov 2021 at 12:31:54
    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 30 Nov 2021 at 09:51:39
    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 30 Nov 2021 at 08:59:45
    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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete