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 / Booking times needs to...
Power Apps
Unanswered

Booking times needs to be cleared when the time is expired

(0) ShareShare
ReportReport
Posted on by 5

Hey,

a problem i am facing is that the booking time I want that registeres a users check in and check out time, needs to ble cleared, when the booking time/date is expired. 

 

Check the picture below. For now the check in time and check out stays there, so that users can see its future or live check in/bookings. But when the date is expired, i want it to be removed from that gallery where it says "Mine bookinger". Any ideas..?

 

My code :

Under Items on the gallery:

SortByColumns(Filter(Treningsapp;Title = glbUser.FullName);"SjekkInnTid";SortOrder.Ascending)

Onselect on Sjekk inn button:

If(mytext = "Sjekk inn"; UpdateContext({mytext: "Sjekk inn"}); UpdateContext({mytext: Text(Now(); "hh:mm")})) ;;
ClearCollect(
colEnableButton;
{
SjekkInnTid : Now();
Bruker :If(Anonym.Value=true;"Anonym"; glbUser.FullName)
}

);;
Set(sjekkInnRecord;
Patch(Treningsapp;Defaults(Treningsapp);
{

Title:If(Anonym.Value=true;"Anonym";glbUser.FullName);
SjekkInnTid :Now()
//Bruker:If(Anonym.Value=true,"Anonym",glbUser.FullName)
}
)
);;
Reset(Anonym);;
UpdateContext({varSjekkinn: true})

 

Onselcet on Check out button:

If(mytext = "Sjekk ut"; UpdateContext({mytext: "Sjekk ut"}); UpdateContext({mytext: Text(Now(); "hh:mm")})) ;;
ClearCollect(
colEnableButton;
{
SjekkUtTid : Now();
Bruker :If(Anonym.Value=true;"Anonym"; glbUser.FullName)
}
);;
Refresh(Treningsapp);;
If(
!IsBlank(sjekkInnRecord);
Patch(Treningsapp;
sjekkInnRecord;
{

Title:If(Anonym.Value=true;"Anonym";glbUser.FullName);
SjekkUtTid:Now()
//Bruker:If(Checkbox1.Value=true,"Anonym",glbUser.FullName)
}
)
);;
Reset(Anonym);;
UpdateContext({varSjekkinn: false})

 

And under gallery i have set up two labels.

1. Under "Text" on label1 one its: ThisItem.SjekkInnTid

2. under "Text" on label two its: ThisItem.SjekkutTid 

 

Demha3333_0-1683021584065.png

 

 

Categories:
I have the same question (0)

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard